There are two ways to restrict the search to a certain area of your site

  1. Control what is indexed by our crawler
  2. Index everything, but control what is returned by the search

1. Site areas – Control what is indexed

With Site area settings you can define which sections of your website are indexed. For example, if you want to leave the News section ( out from the search, create a Site area setting /news/ EXCLUDE. If you want to index only News section, create two Site area rules:

/news/ 100%

This would leave URLs with “/news/” in the index. For the full documentation of Site area settings, see Site areas instructions. For other ways to exclude content from AddSearch, see Including and Excluding content.

2. Category filters – Control what is shown

If you want to restrict the search only on certain pages, you can do it by using category filters. The category is a property of an indexed page determined by its domain and each path segment. For example, a page with URL would have a category property “, 1=some, 2=path”. You can configure the search script to limit its results to pages that for example have a certain domain or first path segment.

Maybe you have a forum section, and would like it to have its own search that would only return forum posts, and have those results excluded from the main site’s search. Here are some examples of how this could be accomplished:

Main site at, forum at

Search script snippet on the main site:
<script src=""></script>

Search script snippet on forum:
<script src=""></script>

Main site at, forums with combined search at and

Search script snippet on the main site, excluding forums:
<script src="!1xforum,!1xanother-forum"></script>

Search script snippet on forum:
<script src=",1xanother-forum"></script>

To limit search results to a subpath, use slash instead of a comma to define the nested category. For example “categories=1xpublic/2xforum” would limit the search path “/public/forum”.

Multiple search fields

If you have multiple widgets on a single page use data-addsearch-categories attributes to define field-specific filters:
<input class="addsearch" data-addsearch-categories="1xsupport" ... >

Filter by file type

You can filter search to a certain type of documents. Here is an example of the category filter to show PDFs only: categories=doctype_pdf. The whole list of options:

  • doctype_html
  • doctype_pdf
  • doctype_doc
  • doctype_docx
  • doctype_ppt
  • doctype_pptx

Dynamic category filters

If you are using our Separate results page view, you can implement dynamic category filters and let your users filter results in real-time.

Filtering against addsearch-category

If you define page’s category with the addsearch-category meta tag, you can filter search results against that tag’s value. For example, only pages with the tag:

<meta name="addsearch-category" content="products" />

could be searched with the categories parameter:

<script src=""></script>