Skip to content

Instantly share code, notes, and snippets.

@dscamahorn
Created July 31, 2015 15:14
Show Gist options
  • Save dscamahorn/839b4b3daae0f216ac3d to your computer and use it in GitHub Desktop.
Save dscamahorn/839b4b3daae0f216ac3d to your computer and use it in GitHub Desktop.
Configure REP directives via X-Robots-Tags. Apache with Headers Module - .htaccess file or httpd.conf
<IfModule mod_headers.c>
# REP directives for all files
<Files ~ ".*">
Header set X-Robots-Tag "noarchive, noodp"
</Files>
#REP directives for specific files
<Files ~ "\.(png|jpe?g|gif|mp4|ogv|webm|flv|fla|js|xml|json|txt|css)$">
Header set X-Robots-Tag "noindex"
</Files>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment