Created
December 19, 2011 14:32
-
-
Save perusio/1497464 to your computer and use it in GitHub Desktop.
How to have an "inline" robots.txt for development/private setups
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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