Skip to content

Instantly share code, notes, and snippets.

@perusio
Created December 19, 2011 14:32
Show Gist options
  • Save perusio/1497464 to your computer and use it in GitHub Desktop.
Save perusio/1497464 to your computer and use it in GitHub Desktop.
How to have an "inline" robots.txt for development/private setups
## Here's the way to have Nginx return a robots.txt file that disallows all crawling by bots.
## This is useful for development and private sites.
location = /robots.txt {
return 200 "User-agent: *\nDisallow: /\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment