Skip to content
FunnelGuard

Fix guide by FunnelsGuard

apple-app-site-association missing or redirected: how to fix it

APP-009High impactDetectedBy FunnelGuardPublished Updated
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:

Common failure modes
  • 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.

What happens to an ad click
  1. Ad or email clickLink to your campaign URL
  2. iOS checks AASAFile is 404, redirected, login or HTML
  3. App opensNever happens
  4. 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.

Campaign clicks that open the appExample numbers
Campaign clicks that open the app (example)AASA broken: 0 %; AASA fixed: 90 %03469090AASA brokenAASA fixed%

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.

Check the file without following redirectsbash
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
What to look for in the response
SignalGoodProblem
Status200301, 302, 401, 403 or 404
Content-Typeapplication/json (or application/pkcs7-mime if signed)text/html
BodyJSON starting with {Starts with <!DOCTYPE or <html
Location headerNoneAny redirect target

How to fix it

Fix the AASA file
  1. 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.

  2. Publish it at /.well-known/

    Make it reachable at https://yourdomain.com/.well-known/apple-app-site-association on every host used in links.

  3. Remove redirects

    The URL itself must answer 200. Exclude it from http to https, www and trailing-slash rules.

  4. Take it out from behind logins and challenges

    Allow public access in your firewall, CDN, staging password or maintenance mode rules for this path.

  5. Serve it as JSON

    Set Content-Type to application/json so the server does not return an HTML page.

Minimal apple-app-site-association examplejson
{
  "applinks": {
    "details": [
      {
        "appIDs": ["ABCDE12345.com.example.app"],
        "components": [
          { "/": "/offers/*" }
        ]
      }
    ]
  }
}
How to publish the file on your platform
  1. Upload to .well-known

    Via SFTP or your host's file manager, create /.well-known/ in the site root and upload the file there.

  2. 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.

  3. Set the content type

    Add a rule in .htaccess (Apache) as shown in the Custom code tab.

Nginx: serve the file as JSON with no redirectnginx
location = /.well-known/apple-app-site-association {
    default_type application/json;
    root /var/www/yourdomain;
}
Apache: force JSON content typehtaccess
<Files "apple-app-site-association">
  ForceType application/json
</Files>

How to confirm it's fixed

Verify the fix
  1. Re-run curl

    You should see HTTP 200, a JSON content type and a body that starts with {.

  2. Test in a private window

    Open the URL while logged out to confirm no login or challenge appears.

  3. 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

Keep the file healthy
  • 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.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: app_site_association.

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.