Reputation: 2595
If Nginx works as reverse proxy between Apache and the web, where should i add X-Robots-Tag (to add some additional headers) - in the htaccess of Apache or in the Nginx configuration file?
Upvotes: 1
Views: 1327
Reputation: 45829
You can do it in either place. Although, for a header like X-Robots-Tag
, which is very much page specific then it would probably be easier to set this at the application server (in your application/CMS). Devs may not have access to the proxy server in order to apply specific headers.
Alternatively, you might choose to do this in the front-end proxy if you wanted to apply this to every request, or to a specific pattern.
But you should not apply the same header in both places, as that becomes hard to maintain (and debug).
Upvotes: 1