On this page
What this issue is
Universal Links let a normal web link (such as https://example.com/offer) open your iOS app directly. iOS decides whether to allow this by reading a file on your domain called apple-app-site-association, served at https://example.com/.well-known/apple-app-site-association.
This issue is about the content of that file being wrong. Three common faults: the JSON is malformed (a trailing comma, a missing bracket, a BOM or stray HTML at the top), the file is over 128 KB, which is Apple's size limit, or an app ID is not in the TEAMID.bundleID form. A missing file, a redirect or a login wall is a different problem (see the related guide on a missing or HTML-served file).
{
"applinks": {
"details": [
{
"appIDs": ["9JA89QQLNQ.com.example.app"],
"components": [
{ "/": "/offer/*" },
{ "/": "/lp/*" }
]
}
]
}
}Why it costs you leads or sales
When the file is rejected, iOS treats your links as ordinary web links. People who tap an ad, email, SMS or QR code with the app installed land on a mobile web page instead of the in-app screen you planned. They may have to log in again, lose their cart, or see a weaker experience. Many will drop off.
It is also hard to notice. The links still work, only in the wrong place, so nothing looks broken on a desktop check and no error appears in your ad platform.
- Ad or email linkUser taps https://example.com/offer
- iOS reads AASAInvalid JSON, over 128 KB or bad app ID
- App opens at the offerNever happens
- In-app purchase or sign-upNot reached
iOS cannot validate the file, so the app never opens.
Example: illustrative numbers only, showing how many installed-app users reach the in-app screen before and after the file is fixed.
How to check if your site has it
Download the file
Run curl -i https://yourdomain.com/.well-known/apple-app-site-association and confirm a 200 status with no redirect.
Check the size
Run curl -s URL | wc -c. The result must be under 131072 bytes (128 KB).
Validate the JSON
Pipe the output to a validator, for example curl -s URL | python3 -m json.tool. Any error means the file is malformed.
Check each app ID
Every entry in appIDs (or the older apps/appID fields) must be your 10-character Apple Team ID, a dot, then the exact bundle ID. Find the Team ID in your Apple Developer account under Membership details.
Test on a device
Send yourself the link in Notes or Messages on an iPhone with the app installed and long-press it. You should see an Open in app option.
URL=https://yourdomain.com/.well-known/apple-app-site-association
curl -sI "$URL" | head -n 5
curl -s "$URL" | wc -c
curl -s "$URL" | python3 -m json.tool > /dev/null && echo "valid JSON"| Written as | Problem | Correct form |
|---|---|---|
| com.example.app | No Team ID | 9JA89QQLNQ.com.example.app |
| 9JA89QQLNQ-com.example.app | Dash instead of dot | 9JA89QQLNQ.com.example.app |
| com.example.app.9JA89QQLNQ | Reversed order | 9JA89QQLNQ.com.example.app |
| App ID prefix copied from an old profile | Wrong Team ID | Use the current Team ID from Membership details |
How to fix it
Fix the JSON syntax
Remove trailing commas, close all brackets, use double quotes, and save as plain UTF-8 without a BOM or any HTML wrapper.
Correct the app IDs
Write each as TEAMID.bundleID. If you ship several apps or variants, list each one.
Reduce the size
If the file is near or over 128 KB, replace long lists of paths with wildcard patterns such as /offer/*, and remove old or unused entries.
Serve it correctly
Keep it at /.well-known/apple-app-site-association with no file extension, over HTTPS, with Content-Type application/json and no redirect.
Match the app
Make sure the app's Associated Domains entitlement contains applinks:yourdomain.com. Changing this needs a new app build.
Edit the physical file
Via SFTP or your host's file manager, edit .well-known/apple-app-site-association in the site root. If a plugin generates it, fix the app ID and paths in that plugin's settings instead.
Check the content type
If the file downloads or shows as text/plain or HTML, add a rule in .htaccess or your server config to serve it as application/json.
Know the limit
Shopify does not let you place arbitrary files in /.well-known/ on the main domain. If your app domain is a Shopify store, host the file on a different domain or subdomain you control, and use that domain in the app's entitlement.
Know the limit
Webflow cannot serve a file with no extension at /.well-known/ directly. Put the file on a domain you control with a proxy or CDN rule, and point the app's associated domain at it.
Fix the file in your repo
Edit the file in the web root's .well-known folder, then deploy. Make sure your build step does not strip files with no extension or folders starting with a dot.
Force the content type
Add the nginx or Apache rule shown below.
location = /.well-known/apple-app-site-association {
default_type application/json;
try_files $uri =404;
}How to confirm it's fixed
- The URL returns 200 with no redirect
- The response parses as valid JSON
- The file is well under 128 KB
- Every appID is TEAMID.bundleID with the correct Team ID
- Your campaign paths match a rule in components (or paths)
- On a real iPhone with the app installed, long-pressing the link shows Open in app
- A fresh install of the app (or a reinstall) picks up the change
How to prevent it happening again
Keep the AASA file in version control and validate it in your deployment pipeline: parse the JSON, check its size, and match each app ID against a TEAMID.bundleID pattern. Re-check it after any change of Apple developer account, bundle ID, CDN, caching rule or site migration, since these often rewrite or drop the file.
f=.well-known/apple-app-site-association
python3 -m json.tool "$f" > /dev/null || exit 1
[ $(wc -c < "$f") -lt 131072 ] || exit 1
grep -Eq '"[A-Z0-9]{10}\.[A-Za-z0-9.-]+"' "$f" || exit 1How FunnelGuard handles this
FunnelGuard detects this issue today. Its app_site_association check fetches your apple-app-site-association file and looks at the file itself: whether it parses as valid JSON, whether it is within the 128 KB limit, and whether the app IDs are in TEAMID.bundleID form. If the check fails, you get an alert with a likely cause.
FunnelGuard does not open your iOS app, so it cannot prove a link opens in-app on a phone. Keep a manual device test after changes. You can start with the Free plan (1 site, 2 journeys, daily checks, no card) or run the free read-only website audit.
Questions people ask
Why are my Universal Links opening in Safari instead of my app?
A common cause is an apple-app-site-association file that iOS rejects. It may be invalid JSON, over 128 KB, or list an app ID that is not in TEAMID.bundleID form. Other causes include a missing Associated Domains entitlement or a path your rules do not cover.
What is the size limit for the apple-app-site-association file?
Apple limits the file to 128 KB. Larger files are ignored, so Universal Links stop working. Shorten it with wildcard patterns and remove unused entries.
What is the correct format for an app ID in apple-app-site-association?
Use your 10-character Apple Team ID, a dot, then the bundle ID, for example 9JA89QQLNQ.com.example.app. You can find the Team ID in your Apple Developer account under Membership details.
How do I validate my apple-app-site-association file?
Download it with curl, check the byte count is under 131072, and run it through a JSON validator such as python3 -m json.tool. Then confirm each app ID format and test a link on an iPhone with the app installed.
Does the apple-app-site-association file need a .json extension?
No. It must be served without any extension at /.well-known/apple-app-site-association over HTTPS, with no redirect. The content type should be application/json.
Why didn't my fix work straight away?
Apple fetches the file through its own CDN and devices pick up changes later, often when the app is installed or updated. Your fix may take time to appear, so retest after a reinstall.
Can FunnelGuard tell me if my apple-app-site-association file is malformed?
Yes. FunnelGuard's app_site_association check looks at the file for valid JSON, the 128 KB limit and correctly formed app IDs, then alerts you if it fails. It does not open your app on a real phone.
Related issues
- APP-009apple-app-site-association missing, behind a redirect or a login, or served as an HTML pageFix guide
- APP-011Campaign URL not covered by the Universal Links rules (path excluded or missing)Fix guide
- APP-012Apple's CDN still serving an outdated apple-app-site-associationFix guide
- APP-008Smart app banner points to a different app than the store linksFix guide
- APP-015Deep link's web page answers 404 for people without the appFix guide
- APP-013assetlinks.json missing, redirected, wrong content type or malformedFix guide