2

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

X-Robots-Tag

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

2

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
0

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

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.