# Site search functionality

**URL:** <https://community.hubspot.com/t/site-search-functionality/533>\
**Category:** CMS Development\
**Created:** [December 7, 2016, 6:47am UTC](https://community.hubspot.com/t/site-search-functionality/533 "2016-12-07T06:47:34Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![ThomasReitz](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/thomasreitz/32/11188_2.png) [@ThomasReitz](https://community.hubspot.com/u/ThomasReitz)\
**Post date:** [August 21, 2018, 1:57pm UTC](https://community.hubspot.com/t/site-search-functionality/533/21 "2018-08-21T13:57:48Z")

</div>

Hi @vonTrapp,

you can set the pathPrefix in your search input module in the HTML&HUBL-code window. This hidden input adds two different parameters to the search-query url. (In this Screenshot: Search only for Blogposts with the pathPrefix=de =\> german blogposts)

 ![Bildschirmfoto 2018-08-21 um 15.40.15.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/2X/2/2a5435456fc38289b0dfea41caadfb38095e662a.jpeg)

On [this page](https://www.knowis.com) you can see different implementations of the search:

- Search on English Website (Topnavigation) =\> Search Results Page delivers Results of the english website.
- Search on German Website =\> German Website Results
- Search on English Blog (Sidebar or Topnavigation) =\> English Blogposts
- Search on German Blog =\> German Blogposts

You also can use the query parameters in the URL to customize the behaviour of the search result page. (German/English Footer, Tabbed Search Module in the sidebar, German/English-“No Results-Message”,…)

I hope this helps a little bit. Best regards

Tom

---

<div class="post-metadata">

**Author:** ![vonTrapp](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/vontrapp/32/37202_2.png) [@vonTrapp](https://community.hubspot.com/u/vonTrapp)\
**Post date:** [August 22, 2018, 1:50pm UTC](https://community.hubspot.com/t/site-search-functionality/533/22 "2018-08-22T13:50:31Z")

</div>

Hi @ThomasReitz,

Thank you for your great and clear explanation. However, I’m still a bit confused about how I may implement it in my particular case. I intend to make a search in a user manual, i.e. a section with a limited group of pages at our site. You can’t isolate these pages by neither page type, language or only first level in the path (Path Prefix). The ability to use several levels in the path would be terrific. Alternatively, if I could tag these pages with a searchable ID. Or do you have an even more clever solution?

---

<div class="post-metadata">

**Author:** ![mcoley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mcoley/32/84874_2.png) [@mcoley](https://community.hubspot.com/u/mcoley)\
**Post date:** [August 22, 2018, 2:11pm UTC](https://community.hubspot.com/t/site-search-functionality/533/23 "2018-08-22T14:11:26Z")

</div>

PathPrefix extends however far you want. So you can do `pathPrefix=/a/very/long/path/` and it will work.

---

<div class="post-metadata">

**Author:** ![vonTrapp](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/vontrapp/32/37202_2.png) [@vonTrapp](https://community.hubspot.com/u/vonTrapp)\
**Post date:** [August 24, 2018, 9:19am UTC](https://community.hubspot.com/t/site-search-functionality/533/24 "2018-08-24T09:19:17Z")

</div>

I agree, it ought to work, but it doesn’t. At least not for me. As soon there is a / in the URL it will be transcoded to %2F (as it should) but there is where it stop working.

It will always result in “Sorry. There are no results for [query string] Try rewording your query, or browse through our site.”

I’m curious about what makes it work for you, but not for me.

---

<div class="post-metadata">

**Author:** ![mcoley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mcoley/32/84874_2.png) [@mcoley](https://community.hubspot.com/u/mcoley)\
**Post date:** [August 24, 2018, 1:41pm UTC](https://community.hubspot.com/t/site-search-functionality/533/25 "2018-08-24T13:41:46Z")

</div>

Hmm let me take a look.

---

<div class="post-metadata">

**Author:** ![mcoley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mcoley/32/84874_2.png) [@mcoley](https://community.hubspot.com/u/mcoley)\
**Post date:** [August 24, 2018, 1:43pm UTC](https://community.hubspot.com/t/site-search-functionality/533/26 "2018-08-24T13:43:51Z")

</div>

[http://www.mattcoley.me/\_hcms/search?term=test&pathPrefix=rss%2Flong%2Ftest](http://www.mattcoley.me/_hcms/search?term=test&pathPrefix=rss%2Flong%2Ftest) appears to work for me. Can you send me a link to the site you are having trouble with?

[Previous page](https://community.hubspot.com/t/site-search-functionality/533.md?page=1)
