名为“Chrome Privacy Preserving Prefetch Proxy”的 Googlebot 会尝试查找说明,以确定它是否可以为在 Chrome 上冲浪的用户预加载您的网站(例如,Chrome 认为指向您网站的链接将被点击)。
Basically what we, webmasters, are interested in is to get rid of 404s caused by this feature. The most simplest way is to create the file traffic-advice
(without any extension) in the directory .well-known
with the content:
基本上,我们网站管理员感兴趣的是摆脱由此功能引起的 404。最简单的方法是在 .well-known
目录中创建文件 traffic-advice
(不带任何扩展名),其内容为:
[{
"user_agent": "prefetch-proxy",
"google_prefetch_proxy_eap": {
"fraction": 1.0
}
}]
Problem is that the bot requires a specific MIME type. On Apache, you can add these lines to the main .htaccess
file:
问题是机器人需要特定的 MIME 类型。在 Apache 上,您可以将以下行添加到主 .htaccess
文件中:
RewriteRule ^\.well-known/traffic-advice$ - [T=application/trafficadvice+json,END]
On Nginx you can alter your config with these lines:
在 Nginx 上,您可以使用以下几行更改您的配置:
# Private Prefetch Proxy
# https://developer.chrome.com/blog/private-prefetch-proxy/
location /.well-known/traffic-advice {
types { } default_type "application/trafficadvice+json; charset=utf-8";
}
More info or advanced Nginx config can be found from the source.
更多信息或高级 Nginx 配置可以从源中找到。