Mobile app version of vmapp.org
Login or Join
Si4351233

: Prevent indexing of site search results Users have the ability to search on my site. This function renders a search results page that has occasionally been indexed by google and served in SERPs.

@Si4351233

Posted in: #Googlebot #GoogleSearch #Noindex #RobotsTxt #Seo

Users have the ability to search on my site. This function renders a search results page that has occasionally been indexed by google and served in SERPs. Normally this is not an issue, but when documents are updated users need to see the most recent information and sometimes stale content/files are index higher than the current information.

The solution would be: <meta name="robots" content="noindex" /> in the head of my search results page. My site is templated, including a base template that has head in it, so the same head gets served for every page. I can't put a noindex in there without some sort of conditional logic that checks if the URL is for a search page, which seems real hacky.

I could create the noindex meta element dynamically with javascript inside my search page template, but someone has brought up that this is pointless because crawlers will crawl only the pre-processed markup. Is this the case?

Alternatively, I could add a disallow in my robots.txt, but Google has said this isn't a great method (2nd paragraph, bold). Any insight on this?

Am I stuck using conditional logic in the head of my base template?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Si4351233

1 Comments

Sorted by latest first Latest Oldest Best

 

@Alves908

Yes, this could very well be the case regarding the pre-processed markup. I'm not aware of any ironclad evidence on this, but I would consider it risky to use the JS solution.

In this specific case disallowing via robots.txt is probably your best solution as it's the solution that Google themselves suggest. Keep in mind that I wasn't able to find that bit of quoted text on the quoted URL though.

"Use robots.txt to prevent crawling of search results pages or other auto-generated pages that don’t add much value for users coming from search engines." (http://searchengineland.com/google-warning-against-letting-your-search-results-get-indexed-10709).

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme