SearchStax Help Center


SEO-Friendly Search Pages

Digital marketers and web developers often need to balance the user benefits of site features and content against any potential impacts those features may have on their site’s ability to rank organically in search engines like Google and Bing.

These challenges include ensuring that search engine bots are able to access high value content across your site and index it appropriately while avoiding any duplicated content or low-value content and dynamic features that shouldn’t get indexed at all.

Internal site search result pages are a dynamic interface and lack any unique or static content that should be indexed in search engines. Google and Bing, however, may not be aware that your search pages should not be indexed leading to your internal search result showing up in those search engines. These low value search result pages crowd out your high value content on static landing pages and lead to a poor user experience when users encounter another search page after they’ve already started a search on Google.

Site Search Page URL and Parameters

Your internal search pages can get mis-indexed by search engines when parameters (such as search query or category) are included in a URL that the search engine crawlers discover. When search engine bots access a search page (e.g. yourdomain.com/search?query=product-info) they’ll attempt to index the page’s content, which is just a list of search results generated by the parameters in the URL.

One option to prevent search engines from indexing your search pages is to add your search page parameters and URLs to your robots.txt exclusion file or include a noindex robots meta tag on your search page. This tells search engines not to index search result pages that match the URL patterns or include the inline tag.

Another option is to include a canonical tag on your search result pages that always points to the “clean” URL without any parameters. This will prevent search engines from accidentally indexing your search results, but they may still index your initial “search” start page under the clean URL provided in the canonical tag.

Including Site Search Schema

Google supports integrating your internal site search features within their search results as part of the Sitelinks Search Box. You’ll need to include additional schema on your site that tells Google about your internal search page and how to pass search queries to your site. When configured correctly, users on Google can start searching directly within your site’s content from Google and jump right to your search result page.

The example below shows an inline JSON-LD schema tag that includes the SearchAction schema and the URL pattern to show internal site search results for a given search_term_string entered on Google’s Sitelinks Search Box. You’ll need to add this schema to your home page so that Google can correctly show the search rich snippet when users are looking for your brand name or website. You can verify your schema configuration using the Rich Results Test tool.

<script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "WebSite",
      "url": "https://www.searchstax.com/",
      "potentialAction": {
        "@type": "SearchAction",
        "target": {
          "@type": "EntryPoint",
          "urlTemplate": "https://www.searchstax.com/search/?searchstax[query]={search_term_string}"
        },
        "query-input": "required name=search_term_string"
      }
    }
</script>

If you’re going to utilize the SearchAction schema you’ll want to set the canonical URL for your search result pages to the urlTemplate in your schema. You may also need to unblock your search page (if you’ve added an inline robots tag or included the search URL in your robots.txt file) so that Google is able to access your SearchAction schema and the search result page itself.

You’ll need to determine how you want to configure your Site Search search result pages so that they don’t accidentally get indexed in other search engines. Depending on how your site search has been integrated you’ll likely need to manually configure your canonical tags or robots configuration and add the appropriate schema to your home page to enable search rich snippets.

Questions?

Do not hesitate to contact the SearchStax Support Desk.


Return to Frequently Asked Questions.