Deep links, universal links and app links: how to open the right app screen
Deep links, universal links and app links compared
A custom URL scheme, such as a made-up prefix ending in a colon, was the older way to open an app from a link. Any app can claim the same prefix, and the link has no fallback, so a missing app produces an error. That is why platforms now prefer https links that the app verifies with the domain.
Universal links on iOS and app links on Android work the same way in principle. The link is an ordinary web address on your domain. The operating system checks a file that your domain publishes, and only then does it hand the link to the installed app. If the check fails or the app is missing, the link opens in the browser, so the user still reaches your content.
How the verification files work
On iOS, the domain serves an association file at a fixed well-known path. The file names your app's team identifier and bundle identifier, and lists the path patterns the app may open. On Android, the domain serves an asset links file at a similar well-known path, which names the app's package name and the fingerprint of the signing certificate.
Both files must be served over https without redirects, and the content type must be correct. A redirect or a login wall on the file is the most common reason verification silently fails. Check the current format in Apple's and Google's documentation, since the field names and the required steps have been updated over time.
- Serve each file at its well-known path with no redirect.
- Include the exact bundle identifier or package name, and every signing certificate fingerprint you use.
- List only the paths the app should open, and keep the rest in the browser.
- Update the file when you add a build with a new signing key, including test builds.
Where links come from: email, QR codes, ads and messages
Links reach the app from many places: a marketing email, a printed QR code on a menu, an ad, a message from a customer service agent or a link in a chat app. Use the same address in every channel, so the link opens the same screen whether it is tapped on a phone or scanned at a counter.
Track where a link came from with a campaign parameter rather than a personal identifier. Never put an email address, a phone number or a customer name into the address, because links are stored in logs, shared between people and sometimes copied into search results.
New installs and deferred deep links
A deferred deep link covers the case where the user does not have the app yet. They tap the link, go to the store, install the app and open it for the first time. The destination screen should still appear after the install, so the link has to carry its destination through the store visit.
On Android, the store can pass a referrer value to the first launch, and the app can read it and route the user. On iOS, the options are more limited because of privacy rules. Attribution services can help, but they depend on the user's consent to tracking, so design a fallback that works when that consent is refused, such as landing on a sensible default screen.
How to test deep links before launch
Test the link the way a user meets it. Paste it into a note, a message or an email and tap it. Typing the address into the browser's address bar does not always trigger the app, so that test proves less than it seems. Repeat the test with the app installed, with the app missing, and after an update that changes the screen the link opens.
Use the platform's own tools for a closer check, such as the simulator or emulator commands that open a link directly, and the verification diagnostics that show whether the file was accepted. Keep a list of the links that matter most, and test each one on a real phone from both platforms before a campaign goes out.
- Tap each link from a message or note on a real phone, not only in the browser.
- Test with the app installed, missing, and freshly updated.
- Check that logged-out users are sent to sign-in and then to the intended screen.
- Confirm the verification file is served without a redirect.
- Keep a written list of the paths each link should open.
Common mistakes that send users to the wrong place
The most common mistake is a verification file that is correct on one domain and missing on another, such as a www address and a bare address. The second is a path that the file does not list, so the link opens in the browser and the user thinks the app is broken. The third is losing the signed-in state, so a link to a private screen lands on the home page after sign-in.
Finally, many teams forget to update the links after a rebuild. When a screen is renamed or removed, decide where its old links should go, and add a redirect in your web server or your app router for each one.
How Hundred Seas helps
Hundred Seas is a product studio in Taipei that builds mobile apps for iOS and Android, and web apps alongside them. We set up link handling as part of the app and the website together, so each link has one destination on both sides. We work in English, Traditional Chinese and Simplified Chinese, so the screens a link opens read correctly for every market we serve.
Each project starts with a scope step of about one week at a fixed price, which ends in a written plan, a clickable prototype and a firm quote. Software then ships in weekly releases, and a monthly run plan keeps the verification files and campaign links working after each release.
Questions
- What is the difference between a deep link and a universal link?
- A deep link is the general idea of a link that opens a specific screen. A universal link is the iOS form that uses a normal https address verified by a file on your domain. It falls back to the website when the app is not installed, which a plain custom scheme does not.
- Why does my link open in the browser instead of the app?
- The usual causes are a verification file that is missing, redirected or wrong, a path that the file does not list, or a link typed into the address bar rather than tapped. Check the file first, then test the link from a message on a real phone.
- Can a deep link take a new user to a screen after they install the app?
- Yes, through a deferred deep link. The destination is carried through the store visit and read on the first launch. Support differs between Android and iOS because of privacy rules, so plan a sensible default screen for users who do not allow the tracking that makes the link reliable.
- Do QR codes need a special type of link?
- No. A QR code should encode the same https link you would send in an email. Using one address for every channel keeps the destination consistent, and it lets the operating system route the scan to the app when it is installed and to the website when it is not.