Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
.htaccess lines to avoid robots indexing
# Make sure mod_headers is enabled in Apache
sudo a2enmod headers
# Place this in .htaccess
<IfModule mod_headers.c>
Header set X-Robots-Tag "noindex, nofollow"
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment