I have three environments:
env.com
env-uat.com
env-pre.com
All three pages run the same code. I want env-uat.com and env-pre.com to both get this in htaccess:
Header set X-Robots-Tag "noindex, nofollow"
This will completely remove these pages, including PDF files, etc. But I do not want to influence env.com.
How can I add an X-Robots-Tag header only for env-uat.com and env-pre.com and NOT env.com?
** UPDATE **
From what I could find so far, it would seem that you can only do something like this :
SetEnvIf Request_URI "^/privacy-policy" NOINDEXFOLLOW
Header set X-Robots-Tag "noindex, follow" env=REDIRECT_NOINDEXFOLLOW
But that makes it specific to PAGE. I want it to be specific to DOMAIN.
source
share