Closed szepeviktor closed 3 years ago
If you're okay with the default behavior, you don't need to do anything. Returning 404 is perfectly valid.
You can provide this file (with the MIME type application/trafficadvice+json
) if you wish to modify it. For example, if you wanted to expressly allow traffic from any prefetch proxy, you could write:
[{"user_agent": "prefetch-proxy", "disallow": false}]
This traffic is related not to Googlebot (the crawler), but determining whether user prefetch traffic from search results should be allowed.
Thank you.
For Apache
RewriteRule "^/\.well-known/traffic-advice$" - [T=application/trafficadvice+json,END]
This example allow "Chrome Privacy Preserving Prefetch Proxy" to Prefetch without limitations:
[{
"user_agent": "prefetch-proxy",
"google_prefetch_proxy_eap": {
"fraction": 1.0
}
}]
Thanks @szepeviktor for Apache config, I used it in my article. This code (ehm, my own work) represents config for right MIME type on Nginx:
# Chrome Privacy Preserving Prefetch Proxy
location /.well-known/traffic-advice {
types { } default_type "application/trafficadvice+json; charset=utf-8";
}
I already receive requests for this file. @jeremyroman Could you provide some simple examples for Google/bot?