# assetlinks.json checker for Android App Links

> Free assetlinks.json checker: test Android App Links verification for any domain. Finds redirects, wrong content type, bad package names and SHA-256 fingerprint mistakes, with a fix for each. Shareable results.

Source: https://straitlink.in/tools/assetlinks-checker/
Markdown: https://straitlink.in/tools/assetlinks-checker.md

## assetlinks.json checker

Check the file that lets Android open your app from a link: status, redirects, content type, package names and SHA-256 fingerprints. Every problem comes with the fix. No account needed.

## What Android checks

When your app is installed, Android reads `https://your-domain/.well-known/assetlinks.json` for every host in an intent filter marked `android:autoVerify="true"`. If the file lists your package name and the SHA-256 fingerprint of the certificate that signed the installed app, the domain is verified and links on it open the app directly, with no "Open with" chooser. If anything fails, Android quietly treats the link as a web link and opens it in the browser.

The verifier is stricter than a browser. It does not follow redirects, it wants a 200 with a JSON body, and it compares fingerprints byte for byte. That is why a file that "opens fine" in Chrome can still fail.

## After the file passes

A clean result here means the domain side is right. Two things remain on the phone: the fingerprint must match the build you installed, and the manifest must ask for verification. On a test device you can ask Android what it decided:

```
adb  shell  pm  verify-app-links  --re-verify  com.example.shop adb  shell  pm  get-app-links  com.example.shop
```

The [deep link tester](https://straitlink.in/tools/deep-link-tester/) prints these commands, filled in with your package and a link. A domain marked `verified` opens your app. `1024` or `legacy_failure` means the file and the installed signature disagree. If your links run on a Strait link domain (`<handle>.strait.link`), Strait serves this file from your app settings; see [App Links & Universal Links](https://straitlink.in/docs/app-links/). Need a file to start from? Use the [assetlinks.json generator](https://straitlink.in/tools/assetlinks-generator/).

## Every rule this checker reports

Each finding in a result links here. The id in grey (for example `android.redirect`) is what the copied report shows, so you can search for it. Checking iPhone links too? See the [AASA validator](https://straitlink.in/tools/aasa-validator/).

### The file could not be fetched Broken

`android.fetch`

The checker could not download the file at all: DNS failed, the connection was refused, https did not work, the server timed out, or the domain points at a private address. Android's verifier would fail the same way.

**Fix:** Open the URL in a browser from a phone on mobile data. It must load over https with a valid certificate, without a login or a bot challenge.

```
curl  -sv  https://example.com/.well-known/assetlinks.json  -o  /dev/null
```

### The file is behind a redirect Broken

`android.redirect`

The URL answered with a 301, 302, 307 or 308. A browser follows it, so the file looks fine, but Android's App Links verifier does not follow redirects for this file and treats the domain as unverified. The usual cause is an apex-to-www redirect or a trailing-slash rule.

**Fix:** Serve the file with a 200 at exactly this URL, on each host your links use (example.com and www.example.com are checked separately).

```
# nginx: serve the file directly, as JSON, with no redirect
location = /.well-known/assetlinks.json {
  default_type application/json;
  try_files $uri =404;
}
```

### The server did not answer 200 Broken

`android.status`

The file must come back with HTTP 200. A 404 means there is no file at this address; a 403 or 5xx usually means a firewall, bot protection, geo-blocking or a login page is in the way.

**Fix:** Publish the file at /.well-known/assetlinks.json and allow anonymous GET requests to it, including from Google's verifier.

```
curl  -i  https://example.com/.well-known/assetlinks.json
```

### A Strait link domain with no Android app yet Broken

`android.not_set_up`

Strait serves this file for you on your link domain, but only once Dashboard → Apps & stores has your Android app. Until then the domain answers 404 "not configured".

**Fix:** Fill in Dashboard → Apps & stores (package name and SHA-256 fingerprint), wait a minute, then check again. Already done? Make sure the domain is your link domain from Dashboard → Setup → Your keys.

```
curl  -i  https:// < your-handl e > .strait.link/.well-known/assetlinks.json
```

### Content-Type is not application/json Degraded

`android.content_type`

The file is served as text/plain, text/html or with no Content-Type. Google documents application/json for this file; some servers serve unknown extensions as octet-stream.

**Fix:** Configure your server or CDN to send Content-Type: application/json for this path.

```
# nginx: serve the file directly, as JSON, with no redirect
location = /.well-known/assetlinks.json {
  default_type application/json;
  try_files $uri =404;
}
```

### Not valid JSON Broken

`android.json`

The body could not be parsed as JSON: a trailing comma, a comment, smart quotes, or an HTML page served in place of the file. Android ignores a file it cannot parse.

**Fix:** Validate the file locally and fix the syntax error.

```
python3  -m  json.tool  assetlinks.json
```

### The file must be a JSON array Broken

`android.shape`

assetlinks.json is a list of statements. A single statement object without the surrounding [ ] is the most common shape mistake.

**Fix:** Wrap your statement in an array.

```
[   {     "relation" :  [ "delegate_permission/common.handle_all_urls" ] ,     "target" :  {       "namespace" :  "android_app" ,       "package_name" :  "com.example.shop" ,       "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"       ]     }   } ]
```

### The file has no statements Broken

`android.empty`

The file is an empty array, so no app is allowed to open links on this domain.

**Fix:** Add a statement with your package name and signing-certificate SHA-256 fingerprint. The assetlinks.json generator builds one.

```
[   {     "relation" :  [ "delegate_permission/common.handle_all_urls" ] ,     "target" :  {       "namespace" :  "android_app" ,       "package_name" :  "com.example.shop" ,       "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"       ]     }   } ]
```

### A statement is not an object Broken

`android.statement`

Each entry in the array must be an object with "relation" and "target". A string or a nested array is skipped.

**Fix:** Use one object per app, in the format below.

```
[   {     "relation" :  [ "delegate_permission/common.handle_all_urls" ] ,     "target" :  {       "namespace" :  "android_app" ,       "package_name" :  "com.example.shop" ,       "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"       ]     }   } ]
```

### "relation" is missing or not for App Links Broken

`android.relation`

App Links need the relation delegate_permission/common.handle_all_urls. A statement with only get_login_creds is valid for sharing sign-in credentials but does not open links.

**Fix:** Add the handle_all_urls relation to the statement for your app.

```
"relation" : [ "delegate_permission/common.handle_all_urls" ]
```

### "target" is missing Broken

`android.target`

Every statement needs a target object naming the app: namespace, package_name and sha256_cert_fingerprints.

**Fix:** Add the target object.

```
"target" : {   "namespace" :  "android_app" ,   "package_name" :  "com.example.shop" ,   "sha256_cert_fingerprints" :  [ "14:6D:…:44:E5" ] }
```

### Unknown namespace Broken

`android.namespace`

For an app the namespace must be exactly "android_app". "android", "app" or a typo makes the statement apply to nothing.

**Fix:** Set the namespace to android_app.

```
"namespace" :  "android_app"
```

### Invalid package_name Broken

`android.package`

package_name must be the application ID from your build.gradle (like com.example.shop): at least two dot-separated parts, each starting with a letter. A display name or a Play Store URL does not match any app.

**Fix:** Copy applicationId from app/build.gradle(.kts), including any flavour suffix you ship.

```
android  {   defaultConfig  {     applicationId  =  "com.example.shop"   } }
```

### No certificate fingerprints Broken

`android.fingerprints`

sha256_cert_fingerprints is missing or empty, so Android has nothing to compare the installed app's signature with.

**Fix:** Add the SHA-256 of the certificate that signs the app people install. With Play App Signing that is the app signing key in Play Console, not your upload key.

```
keytool  -list  -v  -keystore  release.keystore  -alias  release  |  grep  SHA256
```

### A fingerprint is in the wrong format Broken

`android.fingerprint`

Fingerprints are 32 bytes of uppercase hex separated by colons. A SHA-1 (20 bytes), lowercase letters or missing colons all fail to match.

**Fix:** Copy the SHA-256 line from keytool, or from the App signing page in Play Console. The generator normalises the format for you.

```
"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" ]
```

### Duplicate fingerprints Degraded

`android.fingerprint_dup`

The same fingerprint appears twice in one statement. It works, but it usually means one key was pasted twice and another (debug, upload or a second signing key) is missing.

**Fix:** Remove the duplicate and check you have every key you need: the Play app signing key, plus your upload or debug key if you test with those builds.

### One app has several App Links statements Degraded

`android.package_dup`

The same package is granted App Links in more than one statement. It works, but it is easy to update one entry and forget the other.

**Fix:** Merge them into one statement that lists every fingerprint.

### No statement grants App Links Broken

`android.no_app_links`

The file is well formed but no statement has relation handle_all_urls for an android_app target, so links on this domain will not open any app.

**Fix:** Add a statement with the handle_all_urls relation.

```
[   {     "relation" :  [ "delegate_permission/common.handle_all_urls" ] ,     "target" :  {       "namespace" :  "android_app" ,       "package_name" :  "com.example.shop" ,       "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"       ]     }   } ]
```

### Apps allowed to open links OK

`android.apps`

The package names (and how many valid fingerprints each has) that this domain lets open its links.

### assetlinks.json looks correct OK

`android.valid`

Served over https with a 200, no redirect, valid JSON and well-formed statements. Android still compares the fingerprint with the app installed on the phone, which no website can see; if links still open the browser, check you listed the key that signed the installed build.

```
adb  shell  pm  get-app-links  com.example.shop
```

## Questions

Why does my App Link open the browser even though assetlinks.json loads?

The three usual causes: the file is behind a redirect (a browser follows it, the verifier does not), the fingerprint is for a different key than the one that signed the installed app (Play App Signing re-signs your app), or the intent filter in your manifest is missing android:autoVerify="true". This checker finds the first; the rule notes below explain the other two.

Which SHA-256 fingerprint goes in the file?

The one for the certificate that signed the build on the phone. For apps installed from Google Play with Play App Signing, that is the app signing key shown on the App signing page in Play Console, not your upload key. Add your upload or debug key too if you test with builds signed by it.

Do I need the file on www and on the bare domain?

Yes, if links use both. Android verifies each host in your intent filters separately, so example.com and www.example.com each need to serve the file directly with a 200.

Can I share a result?

Yes. After a check the page address ends in ?domain=your-domain. Opening that address runs the same check again, so a teammate sees the current result, not a stale copy.

Does this tool store the domains I check?

No. The engine keeps a report in memory for one minute so repeat checks do not hit your server again, then drops it.

## Links that open the app, with the files handled for you

Strait hosts assetlinks.json and apple-app-site-association on your link domain and shows what happened to every tap.

[Start free](https://app.straitlink.in/?signup=1)

## More free tools

[### Is my app link broken? Paste a page.link, Branch, OneLink, Adjust or any deep link and see what Android, iPhone and desktop get: the app, the store, a web page, or nothing.](https://straitlink.in/tools/link-checker/)
[### Will it open my app? Pick where the link is tapped (WhatsApp, Instagram, Gmail, Chrome, Safari) and see the decision Strait makes for that tap, step by step.](https://straitlink.in/tools/will-it-open/)
[### Test my link on your phone Send a link to your own phone by QR, WhatsApp, Telegram, email or SMS, then tick off what each in-app browser shows against what it should.](https://straitlink.in/tools/test-my-link/)
