Developer using a laptop with code on screen while setting up Android App Links

You tap a link to your website on an Android phone, expecting your app to open. Instead, Chrome opens — or worse, Android asks which app to use every single time. That small moment of friction is usually not a bug in your app. It is a missing or broken assetlinks.json file, and it is one of the most common reasons Android App Links fail.

Android App Links are the links that open directly in your app, without the disambiguation dialog and without sending the user to the browser first. For that to work, Android needs proof that your website and your app belong to the same owner. That proof lives in a tiny JSON file hosted on your website. This guide shows you how to create assetlinks.json correctly, host it where Android looks for it, and fix verification when it refuses to work.

What assetlinks.json Actually Does

Think of assetlinks.json as a public handshake between your domain and your Android app. When a user installs your app, Android checks your website for this file. If the file lists your app’s package name and its SHA-256 signing fingerprint, and the fingerprint matches the app that was installed, Android trusts the association. From then on, links to your domain open in your app automatically.

Without that file, or with a file that contains even a small error, Android falls back to deep links. The user sees a chooser dialog, or the link opens in the browser. Your app still works, but the smooth, app-first experience you wanted is gone. That matters more than it sounds: every extra tap loses people, and a link that opens in the browser instead of your app can break logins, carts, and onboarding flows that depend on the app.

The file itself is simple. It is a JSON array with one entry per app, and each entry states the relationship (usually delegate_permission/common.handle_all_urls), the namespace (android_app), and your app’s package name and certificate fingerprints. Simple does not mean forgiving, though. A trailing comma, a wrong fingerprint, or a redirect will silently break verification.

What You Need Before You Start

Gather three things before you generate the file. First, the exact domain your app links use, for example webtoapkmove.com — not the Play Store URL, and not a subdomain you do not control, unless you plan to host the file on that subdomain too. Verification is per host, so www.example.com and example.com are different hosts and each needs its own file.

Second, your app’s package name, exactly as it appears in your build, such as com.example.myapp. Package names are case-sensitive, and a single mistyped character is enough to fail. Copy it from your app’s build configuration or from the Play Console rather than typing it from memory.

Third, the SHA-256 fingerprint of the certificate your app is signed with. If you publish through Google Play, use the fingerprint from Play App Signing in the Play Console, under Setup, then App signing — that is the fingerprint Google actually signs the delivered APK with. If you distribute an APK yourself, use the fingerprint of your release keystore. The older SHA-1 fingerprint alone is not enough for App Links; Android checks SHA-256.

How to Create assetlinks.json with the Generator

You can write the file by hand, but hand-typing fingerprints is how most mistakes happen. A generator removes that risk. Use the assetlinks.json generator to build the file, then check every field before you download it.

Step 1: Enter your domain and package name

Open the assetlinks.json generator and enter the domain exactly as users reach it, without https:// and without a trailing slash. Then enter your package name exactly as it is in your app. Do not add spaces before or after either value; invisible whitespace is a real cause of failures.

Step 2: Add your SHA-256 fingerprint

Paste the SHA-256 fingerprint from the Play Console or your keystore. It looks like a long string of hexadecimal pairs separated by colons. If the generator asks for the fingerprint with or without colons, follow its format and double-check that you pasted the whole string. A fingerprint copied from a screenshot or a PDF often loses a character, so paste directly from the source.

Step 3: Generate and inspect the file

Generate the file and read the JSON it produces before you upload anything. It should look like this:

[{
  "relation": ["delegate_permission/common.handle_all_urls"],
  "target": {
    "namespace": "android_app",
    "package_name": "com.example.myapp",
    "sha256_cert_fingerprints": ["AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33"]
  }
}]

Replace the example package name and fingerprint with your own. Check that the relation is delegate_permission/common.handle_all_urls, that the namespace is android_app, and that there is exactly one top-level array. If you support more than one app from the same domain, add one entry per app rather than one file per app.

Step 4: Download and name the file correctly

Download the generated file and make sure its name is exactly assetlinks.json — all lowercase, with the .json extension. Windows sometimes hides extensions, so check that the file is not actually assetlinks.json.txt. That extra extension is a classic failure, and it is easy to miss.

How to Host assetlinks.json Correctly

Hosting is where most verification failures actually happen. The file must be reachable at https://yourdomain.com/.well-known/assetlinks.json, over HTTPS, with no redirect to another host. Android will not follow a redirect to a different domain, and it will not fetch the file over plain HTTP.

Upload the file to the .well-known folder in your website’s root. If the folder does not exist, create it. The dot at the start matters, and some file managers and hosting panels hide dot-folders by default, so turn on the option to show hidden files if you cannot see it. After uploading, open the URL in a browser. You should see the raw JSON, not a 404 page, a download prompt for a different file, or your homepage.

Check the response headers if you can. The file should be served with the content type application/json. Most servers do this automatically for .json files, but some return text/plain or text/html, and that can cause problems. Also make sure the file is publicly accessible — no login wall, no bot protection, and no rule that blocks Google’s or Android’s verification requests.

If your site is built with WordPress, upload the file through your hosting file manager or an FTP client rather than the media library, because the media library will rename it and place it in the uploads folder. If you use a caching plugin or a CDN, purge the cache for that URL after uploading, and check the URL in a private browser window to make sure you are seeing the live file, not a cached 404.

How to Test Android App Links Verification

Do not guess whether verification worked — test it. The fastest check is Google’s Digital Asset Links API: open https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://yourdomain.com&relation=delegate_permission/common.handle_all_urls in a browser. A correct setup returns a statement showing your package name and fingerprint. An empty result means Android cannot see a valid association.

On a real device, uninstall the app, then install it again and wait a few moments before tapping a link. Verification happens at install time, so testing with an app that was installed before you fixed the file will not show the fix. After reinstalling, tap a link to your domain from another app, such as an email or a message. It should open directly in your app with no chooser.

For deeper debugging, use adb if you have Android Studio or platform tools installed. The command adb shell pm get-app-links com.example.myapp shows the verification state for your app, and adb shell pm verify-app-links –re-verify com.example.myapp forces Android to re-check. These commands save a lot of time when you are iterating on the file.

Common Verification Failures and How to Fix Them

Most failures fall into a small set of causes. Work through them in order, and re-test after each change.

The fingerprint is wrong

This is the number one cause. People paste the fingerprint from their upload key, a debug keystore, or an older signing key, while Play is delivering the app signed with a different key. Fix it by copying the SHA-256 from Play Console, Setup, App signing, and regenerating the file. If you changed signing keys recently, the old fingerprint will not work.

The file is not at the right URL

A file at yourdomain.com/assetlinks.json or yourdomain.com/wp-content/uploads/assetlinks.json does nothing. It must be at /.well-known/assetlinks.json, on the exact host your links use. Remember that www and non-www are separate hosts, so host the file on both if both serve your site, or redirect one to the other consistently.

A redirect or an error page gets in the way

HTTPS-to-HTTPS redirects on the same host are usually fine, but a redirect from http to https, or from one domain to another, can break verification. Test the URL with a tool that shows redirects, and make the .well-known path return the file directly. Also check that your site does not return a soft 404 — a 200 status with an error page instead of JSON — because Android will read the error page and find no statement.

The JSON is invalid

A missing comma, a stray quote, or an extra closing bracket makes the whole file unreadable. Paste the file contents into a JSON validator before uploading, and re-validate after any manual edit. If you edit the file on the server, do not let your editor add a byte-order mark or change the encoding.

You tested too soon or with the old install

Verification is not instant and it is tied to install time. Reinstall the app after fixing the file, clear the browser’s default-app settings if a link keeps opening in Chrome, and check that your intent filters in AndroidManifest.xml include android:autoVerify=”true” and the correct hosts and schemes. Without autoVerify, Android never checks the file at all.

Tips That Save You a Second Round of Debugging

Keep one assetlinks.json per host, with all your apps listed in it, rather than several conflicting files. Keep the file small and simple: do not add extra relations or fields you do not need, because every extra field is another chance for a typo. When your app is converted from a website with a WebView, double-check that your intent filters match the domains your WebView actually loads — a mismatch between the manifest and the file is a quiet failure. For a fuller walkthrough of the WebView side, read the deep linking in Android WebView guide, which covers intent filters, schemes, and testing links inside a WebView app.

Also, treat the file as part of your release checklist. Every time you change signing keys, add a new app, or move to a new domain, update assetlinks.json first and re-test. It takes five minutes when you do it deliberately, and it can take days of support messages when you discover it after launch.

Frequently Asked Questions

Do I need assetlinks.json for every domain my app opens?

You need it for every domain you want Android to open directly in your app. Domains that should open in the browser do not need a file, and adding one for them would send users to your app for links that belong in the browser.

How long does verification take?

Android checks the file when the app is installed, usually within seconds, but it can take longer on a slow connection. If verification fails at install time, Android may retry later, but the reliable way to test a fix is to reinstall the app.

Can I use the same file for debug and release builds?

Yes, if you add both fingerprints to the same entry. List the debug SHA-256 and the release SHA-256 in the same sha256_cert_fingerprints array. That way the same file works for both builds, and you do not need to swap it when you switch environments.

Does assetlinks.json affect my website’s SEO?

No. Search engines ignore the file for ranking. It only tells Android which app is associated with your domain, and it does not change how your pages are indexed or ranked.

Conclusion

Android App Links feel like magic when they work, and they are maddening when they do not — but the cause is almost always one of a handful of fixable things: a wrong fingerprint, a file in the wrong place, a redirect, or invalid JSON. Generate the file with the assetlinks.json generator, host it at /.well-known/assetlinks.json over HTTPS, and test it with a fresh install. Do that, and your links will open in your app the way your users expect.

Leave a Reply

Your email address will not be published. Required fields are marked *