Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example traffic-advice file content for Google #21

Closed
szepeviktor opened this issue Jun 19, 2021 · 3 comments
Closed

Example traffic-advice file content for Google #21

szepeviktor opened this issue Jun 19, 2021 · 3 comments

Comments

@szepeviktor
Copy link

74.125.208.13 - - [18/Jun/2021:23:29:09 +0000] "GET /.well-known/traffic-advice HTTP/1.1" 404 5596 "-" "Chrome Privacy Preserving Prefetch Proxy"

I already receive requests for this file.
@jeremyroman Could you provide some simple examples for Google/bot?

@jeremyroman
Copy link
Contributor

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.

@szepeviktor
Copy link
Author

Thank you.

For Apache

RewriteRule "^/\.well-known/traffic-advice$" - [T=application/trafficadvice+json,END]

@jasomdotnet
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants