I need to fix my server with the robots tags headers,
X-Robots-Tagis there an easy way to add this in apache httpd.conf?
2 Answers
This worked well for me:
(insert into /etc/apache2/sites-available/<site name>.conf inside the "VirtualHost" tag)
Header Set X-Robots-Tag "noindex, noarchive, nosnippet"The "mod_headers" Apache Module must be enabled also:
sudo a2enmod headers
sudo service apache2 restart You should use this:
<ifModule mod_headers.c> RequestHeader append X-Robots-Tag "something here"
</ifModule>You need to have enabled and activated the mod_headers