Can I 'noindex, follow' a specific page using x robots in .htaccess?
I've found some instructions for noindexing types of files, but I can't find instruction to noindex a single page, and what I have tried so far hasn't worked.
This is the page I'm looking to noindex:
http://www.examplesite.com.au/index.php?route=news/headlines
This is what I have tried so far:
<FilesMatch "/index.php?route=news/headlines$">
Header set X-Robots-Tag "noindex, follow"
</FilesMatch>
Thanks for your time.
FilesMatch
argument is a regular expression, so you probably must "escape" some special characters like.
and?
. I can't test it right now, but I would like to test"/index\.php\?route=news/headlines$"
. – Wiburg.htaccess
; can't you just callheader('X-Robots-Tag: noindex, follow')
, probably in yourheadlines
action in yournews
controller (if this is indeed a MVC architecture)? – Ordinal