You tap a link to your website on an Android phone, expecting your application to open. Instead, the link opens in Chrome or another browser.
This behavior is common when Android cannot verify the relationship between a website and its associated application, when the intent filter does not match the URL, or when the device has a different link-handling preference.
Android App Links allow verified HTTPS links to open directly in the associated Android application. Unlike traditional deep links, verified App Links establish a relationship between a website domain and an application through a verification process.
When App Links stop working, changing the intent filter at random is rarely the best solution. The reliable approach is to check the URL, manifest configuration, domain verification, and device settings in a logical order.
What Are Android App Links?
Android supports several ways to open application content from a URL.
Traditional deep links use intent filters to match URLs. However, multiple applications can claim similar URLs, so Android may need to ask the user which application should handle the link.
Android App Links add website verification to this process. The website publishes a Digital Asset Links file, and Android checks whether the domain is authorized to associate with the application.
A verified association helps Android open matching links directly in the intended app.
Consider a website with the following URL:
https://example.com/products/42
If the domain is correctly associated with an installed application, Android can open the product details screen instead of sending the user to the browser.
Three conditions generally need to be satisfied:
- The application declares an appropriate HTTPS intent filter.
- The website publishes a valid Digital Asset Links file.
- Android successfully verifies the association, and the device's link-handling settings allow the application to open the URL.
A failure in any of these areas can cause unexpected behavior.
Step 1: Check the Intent Filter in AndroidManifest.xml
Start by checking the activity that should receive the incoming link.
A basic App Links intent filter looks like this:
<activity
android:name=".ProductActivity"
android:exported="true">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="example.com" />
</intent-filter>
</activity>
Replace example.com with your actual domain and use the activity that is responsible for handling the incoming URL.
Each declaration serves a specific purpose:
ACTION_VIEW allows the activity to handle a view request.CATEGORY_DEFAULT allows the activity to participate in implicit intent resolution.CATEGORY_BROWSABLE allows links opened from a browser or similar application to reach the activity.android:scheme="https" restricts the matching scheme to HTTPS.android:host="example.com" matches the specified host.android:autoVerify="true" asks Android to verify the associated website for eligible App Links.
The android:exported="true" attribute is important for an activity that must receive implicit intents from other applications on modern Android versions.
If the application needs to support multiple domains, make sure each required domain is covered by the manifest configuration and verification setup.
Step 2: Verify the Digital Asset Links File
A correct intent filter does not prove that the domain is verified.
The website must serve a Digital Asset Links file at this exact path:
https://example.com/.well-known/assetlinks.json
The file identifies the Android application and the signing certificate associated with it.
A typical entry looks like this:
[
{
"relation": [
"delegate_permission/common.handle_all_urls"
],
"target": {
"namespace": "android_app",
"package_name": "com.example.shop",
"sha256_cert_fingerprints": [
"AA:BB:CC:DD:EE:FF:11:22:33:44:55:66:77:88:99:00:AA:BB:CC:DD:EE:FF:11:22:33:44:55:66:77:88:99:00"
]
}
}
]
This is an illustrative example. Replace the package name and fingerprint with the actual values for your application.
The SHA-256 fingerprint must correspond to the certificate used to sign the installed application. A common source of problems is publishing the fingerprint from the wrong signing configuration.
For example, the certificate used for a locally signed debug build may differ from the certificate used for a production release. Applications distributed through Google Play may also use Play App Signing, in which case the app-signing certificate fingerprint may be the relevant value rather than the upload certificate.
Check the certificate associated with the version users actually install.
Check the file response
Open the asset links file in a browser or inspect the HTTP response.
Confirm that:
- The URL is reachable over HTTPS.
- The server returns valid JSON.
- The response does not redirect to a login page or unrelated URL.
- The file contains the correct package name.
- The SHA-256 fingerprint matches the relevant signing certificate.
- The server does not block verification requests.
A file that looks correct in a local editor can still fail when deployed if the production server returns a redirect, an HTML error page, or a different file.
Step 3: Make Sure the URL Matches the Intent Filter
Android only sends a URL to an activity when the intent filter matches it.
Suppose the manifest contains:
<data
android:scheme="https"
android:host="example.com"
android:pathPrefix="/products" />
This filter is intended to match HTTPS URLs on example.com whose paths begin with /products.
The following URL matches that path pattern:
https://example.com/products/42
However, this URL does not match the path prefix:
https://example.com/account
Similarly, the following URLs may not match the expected host or scheme:
http://example.com/products/42
https://www.example.com/products/42
https://shop.example.com/products/42
The www and subdomain variations are separate hosts. An intent filter for example.com should not be assumed to cover them.
Check the actual URL generated by your website, email, notification, QR code, or marketing campaign. Small differences can explain why some links open the application while others open the browser.
Step 4: Check Domain Verification Status
Android's verification behavior can differ by operating-system version and device implementation. Use the available Android Debug Bridge commands to inspect and test App Links on a connected device.
First, list the package's App Links information:
adb shell pm get-app-links com.example.shop
Replace com.example.shop with your application's package name.
On supported Android versions, the output provides information about the package's domain verification state and selected link-handling settings.
Look for the domain you expect to be verified. If verification has failed, review the manifest, asset links file, and signing certificate.
On devices that support it, you can request domain verification again:
adb shell pm verify-app-links --re-verify com.example.shop
Verification may take time. After running the command, inspect the status again rather than assuming the operation succeeded immediately.
These commands depend on Android version and platform tooling. If a command is unavailable on the target device, use the corresponding App Links tools or settings available for that version.
Step 5: Check the User's Link-Handling Settings
Even when the website association is correct, device settings can affect how links open.
A user may have previously chosen to open supported links in a browser or another application. Device manufacturers can also provide slightly different settings screens.
On many Android devices, you can check the application's settings:
- Open Settings.
- Select Apps.
- Find your application.
- Open the section for opening links or setting the app as the default.
- Check whether supported links are allowed to open in the application.
The exact labels and menu locations vary by Android version and manufacturer.
This check is particularly important when App Links work on one device but consistently open in the browser on another.
Also test with a fresh installation or a clean test device when possible. Existing user preferences can make debugging results difficult to interpret.
Step 6: Test the Link With ADB
You can ask Android to resolve a URL without manually tapping a link in a browser.
For example:
adb shell am start \
-a android.intent.action.VIEW \
-c android.intent.category.BROWSABLE \
-d "https://example.com/products/42"
This sends an implicit view intent containing the specified URL.
Observe which application Android opens and inspect the device logs if the result is unexpected.
If the browser opens, check the URL, the installed package, the manifest, domain verification, and user preferences.
If your application opens but displays the wrong screen, the App Links association may already be working. The remaining issue could be in the application's URL-routing logic.
Separating link resolution from in-app navigation helps narrow down the actual cause.
Step 7: Handle the Incoming URL in the Application
Opening the application is only half of the process. The activity must also interpret the incoming URL and navigate to the correct content.
For example, a Kotlin activity can inspect the incoming intent:
class ProductActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
handleIncomingLink(intent)
}
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
setIntent(intent)
handleIncomingLink(intent)
}
private fun handleIncomingLink(intent: Intent) {
val uri = intent.data ?: return
if (uri.scheme != "https" ||
uri.host != "example.com") {
return
}
when {
uri.pathSegments.firstOrNull() == "products" -> {
val productId = uri.pathSegments.getOrNull(1)
if (!productId.isNullOrBlank()) {
// Navigate to the product identified by productId.
}
}
else -> {
// Handle other supported routes or show a fallback screen.
}
}
}
}
This example assumes that the activity uses AndroidX AppCompat and has the necessary imports. The navigation logic is intentionally left as an application-specific operation.
The onNewIntent() method matters when the activity is reused to handle a new link instead of being created again. Whether this callback is invoked depends on the activity's launch mode and the way Android launches it.
Validate incoming paths and identifiers before using them. A verified domain association does not mean every URL parameter is safe or valid.
Common Reasons App Links Open in the Browser
| Problem | What to check |
|---|
| Incorrect package name | Confirm the package name in assetlinks.json matches the installed app |
| Wrong signing fingerprint | Use the certificate fingerprint associated with the distributed app |
| Missing asset links file | Confirm the file exists at the required well-known path |
| Invalid JSON or server response | Check the HTTP response and JSON structure |
| Incorrect host | Verify the URL's host matches the manifest |
| Unsupported path | Check any path, path-prefix, or path-pattern restrictions |
| Failed domain verification | Inspect the device's verification status |
| User preference overrides | Review the application's supported-link settings |
| Incorrect in-app navigation | Check how the application processes the incoming URI |
| Different build configuration | Compare debug, staging, and production package names and signing certificates |
Best Practices for Production Applications
A reliable App Links implementation should be tested as part of the application's release process.
Use these practices:
- Keep the manifest's domain declarations aligned with the URLs generated by the website.
- Publish the correct Digital Asset Links file for every supported domain.
- Verify the signing fingerprint for the distributed application.
- Test links on the Android versions and devices supported by your application.
- Include tests for valid URLs, unsupported paths, missing identifiers, and malformed parameters.
- Test both fresh installations and upgrades.
- Keep the server-side asset links file available during domain or hosting changes.
- Monitor link-related failures reported by users and support teams.
- Make in-app navigation resilient when a link points to content that no longer exists.
For applications with multiple environments, use a deliberate strategy for development, staging, and production domains. Debug and release builds may have different package names or certificates, and each environment must be configured accordingly.
Summary
Android App Links can open in a browser when the URL does not match the intent filter, domain verification fails, the signing fingerprint is incorrect, or device settings affect link handling.
Start by checking the manifest and the Digital Asset Links file. Then inspect verification status, test the exact URL using ADB, and review the application's incoming-link handling.
Most importantly, distinguish between two problems: Android failing to route the URL to the application and the application opening but failing to navigate to the expected screen.
Testing both stages separately makes App Links issues easier to diagnose and helps prevent broken navigation from reaching production users.
Join the conversation! Your thoughts help the community grow.