Skip to content
FunnelGuard

Fix guide by FunnelsGuard

assetlinks.json missing or broken: how to find and fix it

APP-013High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Android App Links let a normal web link (such as https://example.com/offer) open your app straight away, with no "open with" chooser. To allow this, Android verifies that your domain and your app belong together. It does so by fetching a file called assetlinks.json from https://yourdomain.com/.well-known/assetlinks.json.

The four ways the file fails
ProblemWhat Android seesTypical cause
Missing404 or 403 at the URLFile never uploaded, or the .well-known folder is blocked
Redirected301 or 302 to another URLhttp to https, non-www to www, or a trailing-slash rule
Wrong content typeHTML or text instead of JSONA single-page app or CMS returns its own page; server sends text/html
MalformedInvalid JSON or wrong structureTrailing comma, curly quotes, missing relation, a single object instead of an array

Why it costs you leads or sales

When verification fails, Android treats your link as an ordinary web link. Someone who taps an ad, email or SMS aimed at your app lands in the browser, often on a page that is weaker than the in-app screen. Some will never install or open the app, so the app path of your funnel quietly leaks.

Where the Android app path breaks
  1. Ad or email linkVisitor taps an https link
  2. Android verifies domainFetches /.well-known/assetlinks.json
  3. App opensDeep link opens the right screen
  4. In-app conversionSignup, purchase or booking

A broken assetlinks.json stops verification, so the app never opens.

Visitors reaching the app screenExample numbers
Visitors reaching the app screen (example)Valid assetlinks.json: 70 %; Broken assetlinks.json: 0 %02754700Valid assetlinks.jsonBroken assetlinks.json%

Example: of 100 Android taps on a campaign link, how many open the app with a valid file versus a broken one. Numbers are illustrative.

How to check if your site has it

Check the file in five minutes
  1. Open the URL directly

    Visit https://yourdomain.com/.well-known/assetlinks.json in a browser. You should see JSON, not a 404 page, a login or your homepage. Check every domain and subdomain used in app links.

  2. Check for redirects and the status code

    Run the command below. You want HTTP 200 and no Location header. Any 301 or 302 counts as a failure.

  3. Check the content type

    The Content-Type header should be application/json. If it says text/html, the server is returning a page rather than your file.

  4. Validate the JSON

    Paste the content into a JSON validator. It must be an array, with each entry holding a relation list and a target object.

  5. Use Google's checker

    In Google's Digital Asset Links API, or the App Links Assistant in Android Studio, test your domain and package name to see whether verification succeeds.

Check status, redirects and content typebash
curl -sI https://example.com/.well-known/assetlinks.json

# Expected:
# HTTP/2 200
# content-type: application/json
# (no location: header)

How to fix it

The file must live at exactly /.well-known/assetlinks.json on the host that appears in your links, be reachable over HTTPS, and answer 200 without any redirect. Here is a correct example:

A valid assetlinks.jsonjson
[
  {
    "relation": ["delegate_permission/common.handle_all_urls"],
    "target": {
      "namespace": "android_app",
      "package_name": "com.example.app",
      "sha256_cert_fingerprints": [
        "14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5"
      ]
    }
  }
]

Replace the package name and fingerprint with your own. Then follow the steps for your platform.

Serve the file correctly
  1. Upload to the site root

    Using SFTP or your host's file manager, create a .well-known folder in the folder that holds wp-config.php and put assetlinks.json inside.

  2. Stop WordPress or a plugin catching the URL

    If you get a 404 page or a redirect, check redirect or SEO plugins for rules touching /.well-known/, and make sure any security plugin or firewall rule does not block dot folders.

  3. Test the response

    Run the curl command and confirm 200 and application/json.

nginx: serve the file as JSON, no redirectnginx
location = /.well-known/assetlinks.json {
    default_type application/json;
    try_files $uri =404;
}
Common fixes by cause
  1. Missing

    Create the file at the right path, then clear any CDN cache and check that firewalls do not block /.well-known/.

  2. Redirected

    Remove or exempt the redirect rule for this path. Link to the final host directly so verification never needs a redirect.

  3. Wrong content type

    Set the Content-Type header to application/json and make sure the server returns the file, not an HTML fallback page.

  4. Malformed

    Fix the JSON: use straight quotes, no trailing commas, a top-level array, and a relation plus target in each entry. Validate it before uploading.

Before and after

Broken

  • URL returns 404 or redirects to www
  • Content-Type is text/html
  • Android opens links in the browser

Fixed

  • URL returns 200 directly
  • Content-Type is application/json
  • Valid JSON array with package and fingerprint
  • Links open the app

How to confirm it's fixed

Confirm the fix
  • curl shows HTTP 200 and no Location header
  • Content-Type is application/json
  • The JSON validates and is a top-level array
  • Package name matches your app exactly
  • The file works on every host used in app links
  • Google's Digital Asset Links check or the Android Studio App Links Assistant reports success
  • On a real Android device, a campaign link opens the app (reinstall the app, or wait for re-verification, since Android caches results)

How to prevent it happening again

Keep it working
  • Keep the file in version control and deploy it with the site
  • Add a deploy check that fetches the URL and fails on non-200 or non-JSON
  • Review redirect, CDN and firewall rules whenever you change domains, add www rules or move hosting
  • Update the file when you add a new package name (for example a debug or white-label build)
  • Re-test after every migration or platform change
How it usually unfolds
  1. Day 1

    Site migration adds a redirect rule that catches /.well-known/.

  2. Day 2

    assetlinks.json starts returning a 301. Nothing looks broken on the site.

  3. Week 2

    New app installs fail verification. Android links open in the browser.

  4. Week 3

    The redirect is exempted and the file serves 200 as JSON.

How FunnelGuard handles this

FunnelGuard detects this issue today. Its asset links check requests your domain's /.well-known/assetlinks.json and looks at the response: whether the file exists, whether it is redirected, whether it is served as JSON and whether the content is well formed. If something is wrong, you get an alert with a likely cause.

FunnelGuard re-checks a failure from a second region before it sends one alert, by email, Slack, Teams, WhatsApp, webhook or PagerDuty. The Free plan covers 1 site and 2 journeys with daily checks and needs no card. Paid plans start at $39/month with a 3-day free trial, and a free read-only website audit is also available.

Toggle the file problemInteractive
assetlinks.json is broken

Broken file

Leads or data lost

Android cannot verify the domain, so links open in the browser and the app path is lost.

Turn the cause on to see what a missing, redirected or malformed file does to the app path.

Questions people ask

Why is my assetlinks.json not working?

The usual causes are a 404 at /.well-known/assetlinks.json, a redirect (such as http to https or non-www to www), an HTML content type, or invalid JSON. Run curl -sI on the URL and check for HTTP 200, application/json and no Location header. If those pass, check the package name and fingerprint.

Where should assetlinks.json be located?

It must be at https://yourdomain.com/.well-known/assetlinks.json, on the exact host used in your app links. It must be served over HTTPS with a 200 response and no redirect. Each host or subdomain needs its own file.

Can assetlinks.json be redirected?

No. Android's verification does not follow redirects for this file, so a 301 or 302 counts as a failure. Serve the file directly on the host in your links, or link to the final host.

What content type should assetlinks.json use?

Use application/json. If the server returns text/html, which often happens when a single-page app or CMS answers unknown paths with a page, verification can fail. Check the Content-Type header with curl.

Why do my Android deep links open in the browser instead of the app?

Android only opens verified App Links in your app. If assetlinks.json is missing, redirected, malformed or has the wrong fingerprint, verification fails and the link opens in the browser. Other causes include missing intent filters in the app.

How do I test assetlinks.json?

Fetch the URL with curl or a browser to check status, redirects and content type, validate the JSON, then use Google's Digital Asset Links tool or the App Links Assistant in Android Studio. Finally reinstall the app on a real Android phone and tap a link.

Can I host assetlinks.json on Shopify, Wix or Squarespace?

These builders generally do not let you place a file at /.well-known/ on the main domain, though this can change, so check current documentation. The usual workaround is a proxy or CDN rule, or a subdomain on a host you control that you use for app links.

Does FunnelGuard check assetlinks.json?

Yes. FunnelGuard requests the file on your domain and flags it if it is missing, redirected, served with the wrong content type or malformed. It re-checks from a second region before sending one alert with a likely cause.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: asset_links.

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.