wordpress-nginx-main/globals/dev.restrictions.conf
hhftechnologies dd82b3e56c update
2024-09-28 17:48:20 +05:30

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; }