eeee55e215
serve -s 会把 .html 301 去后缀,百度站长验证失败;同时放开 robots 抓取,避免旧标题一直留在 SERP。
13 lines
524 B
Plaintext
13 lines
524 B
Plaintext
# 禁止搜索引擎收录(shop / partner / admin,含测试域)
|
|
# 必须允许抓取页面:Disallow:/ 会让百度无法读到 noindex,旧标题会一直留在 SERP。
|
|
# X-Robots-Tag 覆盖不先读 robots.txt / 不执行 JS 的抓取器。
|
|
|
|
add_header X-Robots-Tag "noindex, nofollow, noarchive, nosnippet" always;
|
|
|
|
location = /robots.txt {
|
|
default_type text/plain;
|
|
charset utf-8;
|
|
add_header X-Robots-Tag "noindex, nofollow, noarchive, nosnippet" always;
|
|
return 200 "User-agent: *\nAllow: /\n";
|
|
}
|