Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Apple CDN serving an outdated apple-app-site-association: fix

APP-012Medium impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Universal Links let a normal https link open your iOS app instead of the web page. For that to work, your site serves a JSON file called apple-app-site-association at https://yourdomain.com/.well-known/apple-app-site-association. It lists the app ID and the URL paths the app should handle.

Devices do not usually download this file from your server. Apple fetches it and caches it on its own CDN at app-site-association.cdn-apple.com. The phone asks the CDN. If the CDN still holds an older version of your file, iPhones follow the old rules even though your site now serves the new ones.

Why it costs you leads or sales

When you add a new path, such as a campaign landing page or a checkout link, the old CDN copy does not list it. Visitors who have the app tap your ad or email link and land in a browser instead of the app. They lose their cart context, their login or the offer you promised.

The reverse also happens. If you removed a path, the stale copy may still send people into the app for a page it no longer handles. Either way, the link behaves differently from what you tested on your own site, so the problem is easy to miss.

Where a stale AASA copy breaks the journey
  1. Ad or email linkVisitor taps a new campaign URL
  2. Your AASA fileUpdated with the new path
  3. Apple CDN copyStill the old version
  4. App opensDoes not happen, opens browser
  5. In-app conversionLost

Your live file is correct, but the phone reads Apple's older copy.

How to check if your site has it

Fetch both copies and compare them. They should match, apart from whitespace.

Compare your file with Apple's CDN copybash
# Your live file
curl -s https://example.com/.well-known/apple-app-site-association

# Apple's CDN copy
curl -s https://app-site-association.cdn-apple.com/a/v1/example.com

# Show response headers of the CDN copy
curl -sI https://app-site-association.cdn-apple.com/a/v1/example.com

Replace example.com with your domain. If you use an applinks: entry with a subdomain, check that exact host. Look at the appIDs or appID values and the paths, components or substitutionVariables entries. A missing path or an old app ID means the CDN is behind.

What the comparison tells you
ResultMeaningNext step
CDN copy equals live fileNot a CDN problemCheck the app's Associated Domains and the link paths
CDN copy older than live fileStale CDN cacheWait for refresh, then retest
CDN returns an error or empty bodyApple could not fetch your fileFix the live file first (APP-009, APP-010)
Both copies are oldYour deploy did not publish the changeRedeploy and clear your own cache or CDN

How to fix it

You cannot force Apple's CDN to refresh. What you control is making sure your own file is correct and stable, so the next Apple fetch picks it up.

Get the CDN to pick up your current file
  1. Confirm your live file is the one you want

    Open the .well-known URL in a private window. Check the paths, app ID in TEAMID.bundleid form and valid JSON.

  2. Clear your own caches

    Purge any CDN, host or plugin cache in front of your site so Apple's crawler does not receive an old copy from you.

  3. Serve the file directly

    Return HTTP 200 with Content-Type: application/json, no redirects and no login. Apple will not follow redirects for this file.

  4. Wait for Apple to refresh

    Apple controls the cache lifetime and does not publish a guaranteed time. Recheck the CDN URL after several hours, and again the next day.

  5. Reinstall the app to test

    On a test iPhone, delete and reinstall the app (or install a fresh build) so iOS fetches the association data again.

Publish and purge by platform
  1. Upload the file

    Place apple-app-site-association (no extension) in the .well-known folder in your site root via SFTP or your host's file manager.

  2. Set the content type

    Add a rule in .htaccess or your server config so the file is served as application/json.

  3. Purge caches

    Clear your caching plugin and any host or Cloudflare cache for the .well-known path.

nginx: serve the file as JSONnginx
location = /.well-known/apple-app-site-association {
    default_type application/json;
    add_header Cache-Control "no-cache";
}
Before and after the CDN refreshes

Stale CDN copy

  • New campaign paths missing from Apple's copy
  • Links open in Safari for app users
  • Your site shows the right file, so it looks fine

CDN matches live file

  • Campaign paths listed in both copies
  • Links open the app for installed users
  • Comparison shows no difference

How to confirm it's fixed

Confirmation checklist
  • The CDN URL returns the same paths and app IDs as your live file
  • Your live file returns 200 with a JSON content type and no redirect
  • You reinstalled the app on a test iPhone
  • A new campaign link, tapped from Notes or Messages, opens the app
  • The same link opens the web page for a device without the app

How to prevent it happening again

Prevention habits
  • Use wildcard path rules so new landing pages are covered without edits
  • Compare live and CDN copies after every AASA change
  • Allow time for the CDN to refresh before launching a campaign on a new path
  • Do not put the file behind redirects, logins or bot challenges
  • Keep the file in version control and review changes with the app team
Example: how a stale copy shows up around a launch
  1. Day 1

    You add /offer/* to the live file and publish it.

  2. Day 1

    Campaign goes live. Apple's CDN still has the old file.

  3. Day 2

    App users land in Safari. Nobody notices because the site file looks right.

  4. Day 3

    CDN refreshes and links start opening the app.

How FunnelGuard handles this

FunnelGuard detects this issue today. Its app_site_association check fetches the apple-app-site-association file from your site and compares it with the copy on Apple's CDN. When the two differ, you are alerted so you can see that the CDN is behind before campaign traffic hits the affected paths.

Checks run on a schedule. A failure is re-checked from a second region before one alert goes out by email, Slack, Teams, WhatsApp, webhook or PagerDuty, with a likely cause. The Free plan covers 1 site with daily checks and no card, and paid plans have a 3-day free trial. A free read-only website audit is also available.

Questions people ask

Why is my apple-app-site-association file not updating on Apple's CDN?

Apple fetches and caches your file on its own CDN and does not refresh it on demand. Your edit only appears after Apple's next fetch. Make sure your live file returns 200 with JSON and no redirect, then recheck the CDN URL over the following hours.

How do I check Apple's CDN copy of my AASA file?

Open or curl https://app-site-association.cdn-apple.com/a/v1/yourdomain.com, replacing the domain with yours. Compare the app IDs and paths with the file at /.well-known/apple-app-site-association on your site.

How long does Apple's CDN take to update the AASA file?

Apple does not publish a guaranteed time. In practice you should allow several hours and sometimes longer, so avoid launching campaigns on new paths right after editing the file.

Why do Universal Links still open Safari after I fixed my AASA file?

The phone may be using the old CDN copy, or the app was installed before the update. Check the CDN copy matches, then delete and reinstall the app and tap the link from Notes or Messages, not the Safari address bar.

Can I force Apple to refresh the apple-app-site-association cache?

No. You can only make sure your own file is correct, reachable and not cached by your CDN, then wait for Apple's next fetch. Reinstalling the app on a test device makes iOS request the data again.

Does a redirect on the apple-app-site-association file cause stale data?

A redirect can stop Apple fetching the file at all, so the CDN keeps an older copy or has none. Serve the file directly at the .well-known URL with no redirect or login.

How can I be alerted when the Apple CDN copy differs from my site?

FunnelGuard's app_site_association check compares your site's file with Apple's CDN copy on a schedule and alerts you when they differ.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: app_site_association compares the site's file with Apple's CDN copy.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.