-
Notifications
You must be signed in to change notification settings - Fork 6
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
Consider changing behaviour of requests to /.well-known/traffic-advice to stop 404 log entries #17
Comments
Sorry this is causing you trouble. FWIW, the volume of requests should go down soon as we're implementing another caching layer. Two questions:
|
I think either a DNS entry or adding something to the Adding a file with a custom mime type I think will be beyond your average user (I am not sure they will even care about this though). The users that do care about this are probably not going to be too happy about any process that requires actual development as one of the comments mentioned in #16 DNS entry would be the easiest but wont give you page level control. For us it was easy as we just added it as an advanced response in Fastly (see below). I took a quick look in Cloudflare and could not see any way to create a response there with a custom mime type. |
The limitation with I'm happy to see that Fastly supports this well at least. The tension here is that we should follow best practices. The /.well-known URL RFC says that a "good practice" is "Using an application-specific media type in the Content-Type header field, and requiring clients to fail if it is not used", and the W3C Web Platform Design Principles states, "Always define a corresponding MIME type and extend existing APIs to support this type for any new data format." |
Adding a DNS entry is not available to most developers. It also requires an additional skillset that not every developer has. As for the application-specific media type, I would point out that there are several well-known URLs with the .json extension, and others with the .txt extension. |
At 1 of the largest hosters in the world (SiteGround) it is not possible on all hosting plans to set the MIME type in the .well-known folder. Siteground's response: I am afraid that this Private Prefetch Proxy option is not compatible with our servers at the moment." |
Thanks for sharing that. As noted, the Your hosting provider could support this in the future by either serving the traffic advice themselves (and giving customers some UI affordance for controlling it, possibly even dynamically) or by rewriting it internally (not by serving a redirect) to some URL that customers do have configuration control over, such as: location = /.well-known/traffic-advice {
rewrite ^/\.well-known/traffic-advice$ /.some-other-path/traffic-advice;
} Of course, neither of these helps you immediately and it's useful to know that this is a barrier to some. |
Semi-related to #16
We monitor specifically for requests from Google IP ranges (specifically
66.*
) that get anything other than a 200 response. This helps us identify issues where a page in our CMS may have got unpublished or someone changed a slug without adding a 301 and the GoogleBot is now running into 404s or other issues.In the past 7 days we got 3,290 404s for https://www.betterteam.com/.well-known/traffic-advice file which triggered a number of alerts. I know we can ignore this directory entirely but it would be ideal if another method could be found which does not cause 404s.
404s also bypass our cache which then hits our origin server with extra requests.
We added the missing file to https://www.betterteam.com/.well-known/traffic-advice so it now gets a 200.
The text was updated successfully, but these errors were encountered: