A link can open the wrong app, stay in the browser, or fail to reach the intended page because phones handle ordinary web links, app-specific schemes, and verified app links differently. This guide explains the differences and gives website owners a practical way to check link formats, domain associations, app installation, and browser behavior.
Documentation note: I couldn’t retrieve live Apple or Android documentation for this draft. The platform details below describe established behavior, but check the current official documentation and test on your supported OS versions before changing a production setup.
Key Takeaways
- Prefer normal
https://links for pages that should work whether or not an app is installed. - Android App Links and Apple Universal Links use verified domain associations to connect HTTPS URLs to an app; a custom URL scheme does not provide the same domain verification.
- Check the exact URL, association file, installed app, and the browser or app where the link was tapped—in that order.
- Keep the web destination useful as a fallback. App-link behavior can vary with OS version, browser, app installation, and user settings.
First identify what kind of link you have
A link’s format is an important clue. Check the actual href in the page or the copied URL, not just the text displayed to the visitor.
| Link type | Example | Typical behavior |
|---|---|---|
| Ordinary web link | https://example.com/products/42 | Opens a web page. If the domain and app are associated correctly, the OS may instead open the app. |
| Custom URL scheme | sampleapp://products/42 | Asks the device to open an app registered for that scheme. It may fail if the app is absent, and another app may claim the same scheme. |
| Android App Link | https://example.com/products/42 | A verified HTTPS link that Android can route to an app associated with the domain. |
| Apple Universal Link | https://example.com/products/42 | A verified HTTPS link that iOS can route to an app associated with the domain. |
Android App Links and Apple Universal Links look like ordinary HTTPS links. The domain association tells the platform which app is authorized to handle eligible URLs. A custom scheme such as sampleapp:// instead depends on app registration and does not establish that the app controls a particular website domain.
If the visible link says one thing but its href points to a custom scheme, a different domain, or a redirect service, investigate that discrepancy first.
A diagnostic sequence for website owners
1. Record the exact URL and the result
Copy the link and note its complete value, including the scheme, hostname, path, query string, and any redirect. Test the same URL in a fresh browser tab and by tapping it from the place where the problem occurs.
Record what happens: the intended app opens, another app opens, the browser stays open, or an error appears. Also note the device model, OS version, browser, whether the link was tapped in an email or social app, and whether the target app is installed. These details help distinguish a bad link from a platform or browser choice.
2. Check the URL and app-side route
For a broad-compatibility link, use an HTTPS URL on the intended domain. Confirm that the domain, path, and any required query parameters are correct and that the app has a route for that path. A valid domain association cannot make an app handle a route the app does not recognize.
Look for redirects that change the hostname or scheme. A shortener, tracking link, or redirect through another domain can affect which association is relevant. Test the final destination as well as the original link.
3. Check the domain association for the platform
Android: The app’s link-handling configuration must match the HTTPS host and relevant URL patterns. Android’s domain-verification flow uses a Digital Asset Links file, commonly served at https://example.com/.well-known/assetlinks.json. Check that it is publicly reachable over HTTPS, valid JSON, and identifies the intended Android package and signing-certificate fingerprint. Also check that the app’s intent filters cover the host and path you are testing. A file for www.example.com does not automatically establish the same association for example.com.
Apple: The app must have the appropriate Associated Domains entitlement for the host, using the applinks: service, and the site must serve an Apple App Site Association (AASA) file that authorizes the app and URL paths. The file is commonly served from https://example.com/.well-known/apple-app-site-association; Apple’s supported configuration and file requirements can change, so verify them against the current Apple documentation. Check each hostname separately, including www if it is used.
For both platforms, verify the exact host and path rules, the app identifier or signing details, and the response from the live production domain. A file that exists on a development host or behind an authenticated page will not establish the production association. Avoid assuming that a successful response in your browser proves the platform has accepted the association.
4. Confirm that the intended app is installed and eligible
App links generally need the matching app to be installed before the OS can hand the URL to it. Test with the intended app installed, then uninstall it and test again to confirm that the web destination remains usable.
If the wrong app opens, check whether that app is registered for the same custom scheme or has a competing link-handling configuration. On Android, user-selected defaults and link-opening settings can affect routing. On Apple devices, app installation state and system handling also matter. Do not assume every visitor has the same settings as a developer’s test device.
5. Compare browser and tap context
Test the link in more than one place: a supported system browser, the website itself, and the in-app browser where the issue was reported. Browsers and apps can handle navigation differently, and behavior can vary across OS releases and user settings. Some browser contexts may keep a link in the web view instead of handing it to an app. On iOS, navigation context can also affect whether a Universal Link opens the app or remains in Safari.
Compare a direct tap with a typed or pasted URL, but do not treat those actions as equivalent. App-link handoff is designed around navigation behavior, and a manually entered address may simply load as a web page.
Keep a dependable fallback to the website
Use an HTTPS page as the durable destination, with content that works for visitors who do not have the app. When the association is valid and the app is installed, the OS may open the app; otherwise the website can provide the requested content or a clear next step.
For an explicit “Open in app” action, prefer a properly configured HTTPS App Link or Universal Link when supported. If you also offer a custom-scheme link, provide a separate, visible web link rather than relying on the custom scheme as the only route. Avoid JavaScript timers that try to guess whether the app opened: backgrounding, slow devices, and browser differences make that detection unreliable and can send visitors to the wrong destination.
A website URL parser can help inspect the scheme, host, path, and query string, but it cannot verify that Apple or Android has accepted an app-domain association. That check requires platform configuration and device testing.
Common Mistakes
- Using a custom scheme as the only link. Visitors without the app may get an error or an unhelpful page.
- Checking only the root domain.
example.comandwww.example.comare distinct hosts for association purposes unless configured accordingly. - Assuming a file is correct because it loads. The contents must authorize the intended app and match the URL rules; platform verification and app configuration matter too.
- Ignoring redirects. A redirect can change the host or scheme, so the URL eventually reached may not be covered by the expected association.
- Testing only on one phone and browser. App installation, OS version, browser, in-app web views, and user settings can change the result.
- Treating a URL inspection tool as a verification test. Parsing a URL does not prove app ownership or link-handling configuration.
Best Practices
- Publish canonical HTTPS links that lead to useful web pages.
- Keep app routes, association-file rules, and website URLs aligned; test representative paths, not just the homepage.
- Verify every hostname used in links, including redirect and
wwwvariants where applicable. - Test both installed-app and app-not-installed cases on the OS versions and browsers you support.
- When troubleshooting a report, capture the exact URL, tap source, device, OS, browser, and app-install state before changing configuration.
- Recheck platform setup after changing app identifiers, signing certificates, domains, URL paths, or association files.
Conclusion
When a link opens the wrong app, start with its actual URL and follow the route through redirects, domain association, app installation, and browser context. Keep HTTPS as a working fallback, and test across the devices and settings your visitors use. The same link can behave differently across platforms, so diagnosis should reproduce the visitor’s exact tap context.
