Skip to content

Instantly share code, notes, and snippets.

@herveguetin
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save herveguetin/126080634129d280b9e6 to your computer and use it in GitHub Desktop.
Save herveguetin/126080634129d280b9e6 to your computer and use it in GitHub Desktop.
.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