404 Handling
Server Level Redirections¶
TODO: Work in progress...
Missing Files Handling¶
Files¶
Create the files listed in the table below in a folder called .well-known in the doc root of your server. These files are used by various platforms to determine how to handle certain requests. The content of these files can be empty or contain specific instructions, but they must exist and have the correct content type.
| File | Purpose | Who asks | Content | Has extension | Needs Content-Type fix |
|---|---|---|---|---|---|
traffic-advice | Controls browser prefetch/preload optimization hints | Chrome | [{"user-agent": "*", "disallow": true}] | No | Yes |
assetlinks.json | Links Android apps to a domain for App Links | Android | [] | Yes | No |
apple-app-site-association | Links iOS/macOS apps to a domain for Universal Links | iOS/macOS | {} | No | Yes |
.well-known/traffic-advice
.well-known/assetlinks.json
.well-known/apple-app-site-association
Configuration¶
Apache¶
<Files "traffic-advice">
ForceType application/json
</Files>
<Files "apple-app-site-association">
ForceType application/json
</Files>
Nginx¶
location = /.well-known/traffic-advice {
default_type application/json;
}
location = /.well-known/apple-app-site-association {
default_type application/json;
}
Verification¶
curl -I https://yourdomain.com/.well-known/traffic-advice
# Should show: Content-Type: application/json
curl -I https://yourdomain.com/.well-known/assetlinks.json
# Should show: Content-Type: application/json
curl -I https://yourdomain.com/.well-known/apple-app-site-association
# Should show: Content-Type: application/json
References¶
- Claude AI Conversation (March 8, 2026)