On this page
What this issue is
Universal Links let a normal web link (for example a link in an ad or email) open your iPhone app instead of a web page. To trust the link, iOS checks a file on your website called apple-app-site-association, often shortened to AASA. It lists your app and the URL paths the app may open.
The file must live at https://yourdomain.com/.well-known/apple-app-site-association (the older location at the site root also exists). It has no .json extension. Apple's rules say it must be served over HTTPS, answer with status 200, and not be redirected. This issue covers four ways that goes wrong:
- The file is missing and the URL returns 404.
- The URL redirects (for example http to https, non-www to www, or a trailing-slash rule).
- The URL sits behind a login, firewall, basic auth or bot challenge.
- The server returns an HTML page (a custom 404, a single-page-app shell or a cookie banner page) with a 200 status.
Why it costs you leads or sales
When iOS cannot read a valid file, it treats your link as an ordinary web link. People who already have your app installed land in Safari instead, often on a page that asks them to log in again or shows a generic home screen. Carts, offers and campaign context are lost along the way.
The failure is silent. Nothing looks broken on your website, and the app itself works. You only notice when app-open rates from campaigns drop or users complain that links do not open the app.
- Ad or email clickLink to your campaign URL
- iOS checks AASAFile is 404, redirected, login or HTML
- App opensNever happens
- In-app purchase or sign-upVisitor is in Safari instead
The break is at the file check, so the app never opens and the in-app steps are lost.
Example: share of clicks from users with the app installed that open the app, before and after fixing the file. Numbers are illustrative.
How to check if your site has it
Request the file the way Apple does: directly, without following redirects. The command below shows the status code, headers and the start of the body.
curl -sS -D - -o /dev/null https://yourdomain.com/.well-known/apple-app-site-association
# Then look at the body
curl -sS https://yourdomain.com/.well-known/apple-app-site-association | head -c 600| Signal | Good | Problem |
|---|---|---|
| Status | 200 | 301, 302, 401, 403 or 404 |
| Content-Type | application/json (or application/pkcs7-mime if signed) | text/html |
| Body | JSON starting with { | Starts with <!DOCTYPE or <html |
| Location header | None | Any redirect target |
How to fix it
Create the file with the right content
Name it apple-app-site-association with no extension. Use your Apple Team ID and bundle ID, and list the paths your campaigns use.
Publish it at /.well-known/
Make it reachable at https://yourdomain.com/.well-known/apple-app-site-association on every host used in links.
Remove redirects
The URL itself must answer 200. Exclude it from http to https, www and trailing-slash rules.
Take it out from behind logins and challenges
Allow public access in your firewall, CDN, staging password or maintenance mode rules for this path.
Serve it as JSON
Set Content-Type to application/json so the server does not return an HTML page.
{
"applinks": {
"details": [
{
"appIDs": ["ABCDE12345.com.example.app"],
"components": [
{ "/": "/offers/*" }
]
}
]
}
}Upload to .well-known
Via SFTP or your host's file manager, create /.well-known/ in the site root and upload the file there.
Check security plugins and caching
Some security plugins block dot-folders and some redirect rules catch the path. Allow it if the check still fails.
Set the content type
Add a rule in .htaccess (Apache) as shown in the Custom code tab.
Know the limit
Shopify does not let you upload arbitrary files to /.well-known/ on your store domain. Check whether your app or theme setup supports it, or host the link domain elsewhere.
Use a separate link domain
Many teams use a subdomain such as link.yourdomain.com on a server you control, and point campaign links to it.
Check what is supported
Webflow hosting does not offer a simple way to serve an extensionless file with a JSON content type at /.well-known/. Verify the response with curl before relying on it.
Use a proxy or separate host
Serve the file from a reverse proxy, CDN rule or a dedicated link subdomain.
Check what is supported
Wix does not give direct file access to /.well-known/ for most sites. Test the URL; if it returns HTML or 404, use a separate link domain you control.
Check what is supported
Squarespace does not offer a straightforward way to host this file at the root path. Test the URL, and if it fails, use a dedicated link subdomain on other hosting.
Apache
Use a FilesMatch rule in .htaccess to force application/json, and exclude the path from rewrite rules.
Nginx
Add a location block for the exact path that sets default_type application/json and returns the file.
location = /.well-known/apple-app-site-association {
default_type application/json;
root /var/www/yourdomain;
}<Files "apple-app-site-association">
ForceType application/json
</Files>How to confirm it's fixed
Re-run curl
You should see HTTP 200, a JSON content type and a body that starts with {.
Test in a private window
Open the URL while logged out to confirm no login or challenge appears.
Test on an iPhone
After the app is installed or updated, tap a campaign link from Notes or Messages. It should open the app. Apple fetches the file when the app installs or updates, and may cache it, so allow time.
How to prevent it happening again
- Exclude /.well-known/ from every redirect, rewrite and login rule.
- Re-test after migrations, CDN or firewall changes, new SSL setups and domain moves.
- Keep the file in version control with the site code.
- Check each host used in campaign links, not just the main domain.
- Add a recurring check so a silent break is caught within a day.
How FunnelGuard handles this
FunnelGuard detects this issue today with its app_site_association check. It requests the apple-app-site-association file on your domain and flags it when the file is missing, redirected, behind a login, or served as an HTML page instead of JSON. Checks run on a schedule, and a failure is re-checked from a second region before one alert goes out with a screenshot and a likely cause.
The Free plan covers 1 site with daily checks and no card. Paid plans start at $39/month with a 3-day free trial, and a free read-only website audit is also available.
Questions people ask
Why are my Universal Links not opening my app?
The most common cause is that iOS cannot read a valid apple-app-site-association file on your domain. It may be missing, redirected, behind a login or returned as HTML. Fix the file first, then check that your link paths are listed in it.
Where should the apple-app-site-association file be located?
Place it at https://yourdomain.com/.well-known/apple-app-site-association. It has no file extension and must be served over HTTPS with a 200 status. Do this on every host that appears in your links.
Can the apple-app-site-association file be redirected?
No. Apple expects the file to be served directly, without a 301 or 302. Exclude the path from http to https, www and trailing-slash redirect rules.
What content type should the apple-app-site-association file use?
Use application/json. The file has no extension, so some servers fall back to HTML or download types. Set the content type explicitly in your server configuration.
How do I check my apple-app-site-association file?
Run curl against the /.well-known/ URL and read the status, content type and body. You want 200, JSON and no redirect. Also open it in a private browser window to confirm it is public.
Why does the file return HTML with a 200 status?
Your site probably has a catch-all rule, such as a single-page-app shell or a custom error page, that answers unknown paths with HTML. Add an exact rule for the file path so the real file is served.
Can I host the file on Shopify, Wix or Squarespace?
These platforms often do not allow files at /.well-known/ on the main domain. Test the URL, and if it fails, use a separate link subdomain hosted somewhere you control.
Does FunnelGuard check the apple-app-site-association file?
Yes. Its app_site_association check flags a file that is missing, redirected, behind a login or served as HTML, and sends one alert after a second-region re-check.
Related issues
- APP-010apple-app-site-association malformed, over 128 kb, or app id not in TEAMID.bundle formFix 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-013assetlinks.json missing, redirected, wrong content type or malformedFix guide
- APP-015Deep link's web page answers 404 for people without the appFix guide
- APP-018Deferred deep link loses the campaign or destination after installFix guide