Skip to content

Instantly share code, notes, and snippets.

@svx
Forked from sergejmueller/nginx.conf
Created May 27, 2020 08:17
Show Gist options
  • Save svx/b28350668b64da2de565e4283f1859d3 to your computer and use it in GitHub Desktop.
Save svx/b28350668b64da2de565e4283f1859d3 to your computer and use it in GitHub Desktop.
Stop search engines from indexing .txt, .log, .xml, .css and .js files in Nginx
location ~* \.(txt|log|xml|css|js)$ {
add_header X-Robots-Tag noindex;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment