I need to fix my server with the robots tags headers,


is there an easy way to add this in apache httpd.conf?


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"

You need to have enabled and activated the mod_headers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.