---
title: 'How to exclude non-routable Pages from SimpleSearch results'
url: 'https://getgrav.org/forum/plugins/how-to-exclude-non-routable-pages-from-simplesearch-results-t3837'
markdown: 'https://getgrav.org/forum/plugins/how-to-exclude-non-routable-pages-from-simplesearch-results-t3837.md'
date: '2026-06-21'
description: "Hi everyone, I'm currently using the SimpleSearch plugin on my GRAV CMS website to search and display results. However, I'm encountering an issue where the"
---

[Plugins](https://getgrav.org/forum/plugins)

#   How to exclude non-routable Pages from SimpleSearch results 

 [plugin](https://getgrav.org/forum/tag/plugin) [plugins](https://getgrav.org/forum/tag/plugins)

 Solved by pamtbaau [View solution](https://getgrav.org/forum/plugins/how-to-exclude-non-routable-pages-from-simplesearch-results-t3837#post-38915)

  Started by Norbert 2 years ago · 6 replies · 900 views    

 [2 years ago](https://getgrav.org/forum/plugins/how-to-exclude-non-routable-pages-from-simplesearch-results-t3837#post-38896 "Permalink") 

Hi everyone,

I'm currently using the SimpleSearch plugin on my GRAV CMS website to search and display results. However, I'm encountering an issue where the search results include links to non-routable pages, specifically those located in folders with names prefixed by an underscore (e.g., `_hidden/page.md`).

I would like to find a solution to exclude these non-routable pages from the search results. Ideally, I would prefer to avoid having to add code to each individual non-routable page.

```yaml
simplesearch:
    process: false
```

I found this information: /forum/archive/simplesearch-returns--module-pages-t3670 but something may change.

I think commenting out the line in the simplesearch.php file works:

```php
//Add modular pages again 
$this->collection->merge($modularPageCollection); 
```

but I would also like to avoid such modification inside the file.

Has anyone faced a similar issue or have any suggestions on how to achieve this? Your help would be greatly appreciated!

Thank you in advance.

 [2 years ago](https://getgrav.org/forum/plugins/how-to-exclude-non-routable-pages-from-simplesearch-results-t3837#post-38898 "Permalink") 

Not an answer to your question, but have you tried the [TNT Search plugin](https://github.com/trilbymedia/grav-plugin-tntsearch)?

I can't remember the details of why, but I had lots of problems like yours when I tried making SimpleSearch work, and they mostly went away when I switched to TNT Search. Both are released by the Grav team. There's also Algolia as a premium plugin but I haven't tried it except as a user on the [Grav docs](https://learn.getgrav.org) and I'm not very impressed.

 [2 years ago](https://getgrav.org/forum/plugins/how-to-exclude-non-routable-pages-from-simplesearch-results-t3837#post-38904 "Permalink") 

@q3d,

> However, I’m encountering an issue where the search results include links to non-routable pages, specifically those located in folders with names prefixed by an underscore (e.g., `_hidden/page.md` ).

**"Non-routable"**
The purpose of using the underscore (`_`) as prefix in a foldername is, imho, not to mark it as `non-routable`, but to mark a page as a module. Modules will be treated differently by Grav. Although a module is non-routable, it will be treated differently form pages which are explicitly being marked as non-routable using `routable: false` in the header of the page.

**SimpleSearch**
I suspect when a module (underscore prefixed folder) contains the search keyword, the parent (the modular) will be returned and not the module itself.

If you have a different experience, please share the relevant folder tree and frontmatter.

last edited 05/26/24 by pamtbaau

 [2 years ago](https://getgrav.org/forum/plugins/how-to-exclude-non-routable-pages-from-simplesearch-results-t3837#post-38912 "Permalink") 

> **@hughbris:**
> Not an answer to your question, but have you tried the [TNT Search plugin ](https://github.com/trilbymedia/grav-plugin-tntsearch)?

I wasn't aware of the TNT Search plugin, but I'll definitely take a closer look at it. It sounds like it might resolve some of the issues I'm facing with SimpleSearch.

> **@pamtbaau:**
> **“Non-routable”**
> 
> The purpose of using the underscore (`_`) as prefix in a foldername is, imho, not to mark it as `non-routable`, but to mark a page as a module. Modules will be treated differently by Grav. Although a module is non-routable, it will be treated differently form pages which are explicitly being marked as non-routable using `routable: false` in the header of the page.

Thank you for the detailed explanation regarding "non-routable" pages and the use of the underscore prefix. Your clarification helps me understand how modules are treated differently in GRAV. I appreciate the insight and will consider it while working on my site.

Thanks again to both of you for your helpful suggestions and explanations!

 👍 1 

 [2 years ago](https://getgrav.org/forum/plugins/how-to-exclude-non-routable-pages-from-simplesearch-results-t3837#post-38913 "Permalink") 

@q3d, Just curious, do the pages with `routable: false` still appear in your SimpleSearch?
They don't in my tests...

Please keep the community updated.

 [2 years ago](https://getgrav.org/forum/plugins/how-to-exclude-non-routable-pages-from-simplesearch-results-t3837#post-38914 "Permalink") 

In my case, I have a main page (modular)

`01.start -> modular.md`

```yaml
---
title: Main Page
visible: false
simplesearch:
    process: false
content:
    items: '@self.modules'
---
```

On this page, I display several modules, including, for example, Hero.

Case 1.

`01.start -> 01._hero -> section.md`

section.md:

```yaml
title: 'We invest in the environment together'
block: hero
layout: full-image
...
```

The search finds the phrase ‘We invest in the environment together’ and directs to the main page. Thanks to you, I understand the reasoning behind this behavior. However, in my case, it causes confusion.

Case 2.

```yaml
title: 'We invest in the environment together'
simplesearch:
    process: false
block: hero
layout: full-image
...
```

When entering the phrase: 'We invest in the environment together', the search finds nothing. That's ok!

Case 3.

```yaml
title: 'We invest in the environment together'
routable: false
block: hero
layout: full-image
...
```

Gives me exactly the same result as in Case 1. That is, the phrase is found, and the link from the search results directs to the main page.

---

 [2 years ago](https://getgrav.org/forum/plugins/how-to-exclude-non-routable-pages-from-simplesearch-results-t3837#post-38915 "Permalink")  Solution 

@q3d,

**Case 1:**
This how modules are supposed to be handled by Grav: As part of a parent modular page.

**Case 2:**
That's how, according the [README](https://github.com/getgrav/grav-plugin-simplesearch#ignoring-a-page) of SimpleSearch, pages should be excluded.

**Case 3:**
This is also according the definition of `routable'.

According [Grav's docs](https://learn.getgrav.org/17/content/headers#routable) about `routable`:

> By default, all pages are **routable** . This means that they can be reached by pointing your browser to the URL of the page.
> However, you may need to create a page that is created to hold specific content, **but it is meant to be called directly by a plugin, other content, or even a theme directly**.

- The module is directly called by the modular, hence it will be available according the definition shown above.

 👍 1 

[Log in](https://getgrav.org/login?return=%2Fforum%2Fplugins%2Fhow-to-exclude-non-routable-pages-from-simplesearch-results-t3837) to reply.

###  Suggested topics

 | Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| [Conflict with updated Form plugin and Add Page By Form](https://getgrav.org/forum/plugins/conflict-with-updated-form-plugin-and-add-page-by-form-t9480)    [Plugins](https://getgrav.org/forum/plugins) · by DrPen, 3 weeks ago |  | 2 | 280 | [3 weeks ago](https://getgrav.org/forum/plugins/conflict-with-updated-form-plugin-and-add-page-by-form-t9480 "by DrPen") |
| [grav-mcp update\_page sends lang in the body instead of the query string, so non-default languages are never updated](https://getgrav.org/forum/plugins/grav-mcp-update-page-sends-lang-in-the-body-instead-of-the-query-string-so-non-default-languages-are-never-updated-t9469)    [Plugins](https://getgrav.org/forum/plugins) · by renedebaaij, 4 weeks ago |  | 1 | 260 | [3 weeks ago](https://getgrav.org/forum/plugins/grav-mcp-update-page-sends-lang-in-the-body-instead-of-the-query-string-so-non-default-languages-are-never-updated-t9469 "by Andy Miller") |
| [Tools / Scheduler some jobs not running.](https://getgrav.org/forum/plugins/tools-scheduler-some-jobs-not-running-t9471)    [Plugins](https://getgrav.org/forum/plugins) · by Thomas, 4 weeks ago |  | 1 | 274 | [4 weeks ago](https://getgrav.org/forum/plugins/tools-scheduler-some-jobs-not-running-t9471 "by Thomas") |
| [How to clone a flex object in twig](https://getgrav.org/forum/plugins/how-to-clone-a-flex-object-in-twig-t9438)    [Plugins](https://getgrav.org/forum/plugins) · by complanar, 1 month ago |  | 6 | 592 | [1 month ago](https://getgrav.org/forum/plugins/how-to-clone-a-flex-object-in-twig-t9438 "by complanar") |
| [Integration of GRAV articles into my principal website](https://getgrav.org/forum/plugins/integration-of-grav-articles-into-my-principal-website-t9440)    [Plugins](https://getgrav.org/forum/plugins) · by BenLaKnet, 1 month ago |  | 1 | 495 | [1 month ago](https://getgrav.org/forum/plugins/integration-of-grav-articles-into-my-principal-website-t9440 "by BenLaKnet") |
