1. robots.txt

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13

# robots.txt

User-agent: Googlebot

Disallow: 

User-agent: *

Disallow: /

Sitemap: Sitemap: https://heeeepin.com/sitemap.xml

2. Nginx 限制user-agent

1
2
3
4
5
6
7

if ($http_user_agent ~* (Baiduspider|bingbot|sogou|yahoo|360Spider|Curl|YisouSpider)){

    	return 403;

    }