13 lines
541 B
Text
13 lines
541 B
Text
##### for public facing development sites; also called as staging sites #####
|
|
|
|
# deny access to robots.txt across the board
|
|
location = /robots.txt { access_log off; deny all; }
|
|
location ~ /sitemap { access_log off; deny all; }
|
|
|
|
# block sitemaps with .xml and .xml.gz endings such as news-sitemap.xml (Yoast SEO)
|
|
location ~ \.xml$ { access_log off; deny all; }
|
|
location ~ \.xml\.gz$ { access_log off; deny all; }
|
|
|
|
# deny specific bots
|
|
if ( $http_user_agent ~ "Google" ) { return 403; }
|
|
if ( $http_user_agent ~ "bingbot" ) { return 403; }
|