Flutter deep links let a web link open a specific screen inside your app instead of the browser. On Android this is called App Links and needs a Digital Asset Links file on your domain. On iOS it is called Universal Links and needs an apple-app-site-association file and the Associated Domains entitlement.
Key takeaways
- Flutter deep links need a domain you control, because both platforms verify ownership of that domain before opening the app.
- Android App Links and iOS Universal Links are configured separately, so each platform needs its own file and project settings.
- A failed verification usually falls back to the browser without any visible error, which makes it easy to miss during testing.
- Flutter only handles routing after the link reaches the app, so the router must map every supported path to a screen.
What are Flutter deep links?
A Flutter deep link is a URL that opens a particular place in your app, such as an order detail screen or an invoice, rather than the home page. The operating system decides whether a tapped HTTPS link goes to the app or to the browser. Flutter's role starts after that decision, when it receives the path and chooses a screen.
Flutter's own routing guidance is in the Flutter deep linking documentation. The platform configuration is separate and is defined by each vendor. Most failures come from that platform part rather than from Dart code, so plan for both. Teams that want this built into a mobile product can review Flutter app development services at Rui Codex.
Custom URI schemes such as myapp:// are a different mechanism. They are simple to set up, but any installed app can claim the same scheme, so they do not prove who owns the link. This article focuses on verified HTTPS links.
How do Android App Links verify a domain?
Android App Links open your app directly when the domain has been verified. Verification is a two-part handshake: the app manifest requests it, and a file on your server confirms it.
Configuration steps
- Add an intent filter to the main activity in AndroidManifest.xml with android:autoVerify set to true, the https scheme and your host.
- Publish a Digital Asset Links file at /.well-known/assetlinks.json on that host, listing the app package name and the SHA-256 fingerprint of the signing certificate.
- Confirm the file is served over HTTPS without redirects and with a JSON response.
- Check verification on a device, because a fingerprint from the wrong keystore is one of the most common reasons it fails.
The exact manifest and file format are described in the Android App Links developer guide. Read it alongside your build setup, because debug and release keystores produce different fingerprints and each one needs to be considered.
In a Flutter project, the manifest sits under android/app/src/main. The path structure in the manifest should match the routes your Dart router understands, so the two sides are planned together rather than separately.
How do iOS Universal Links verify a domain?
iOS Universal Links are verified through an apple-app-site-association file on your server and an entitlement in the app. The file names your app identifier and the paths it may open, and the entitlement names the domain.
Configuration steps
- Enable the Associated Domains capability in Xcode and add the applinks entry with the host only, without a path.
- Serve the apple-app-site-association file over HTTPS at the domain root or under /.well-known/, with no redirect and no file extension.
- List the team identifier, the bundle identifier and the paths the app handles.
- Reinstall the app after changing the file, because iOS fetches the association when the app is installed and may not refresh it immediately.
Apple documents the entitlement and file format in its guide to supporting associated domains. Its Universal Links overview explains the behaviour. Check the current text before you deploy, since details can change between iOS releases.
How does Flutter route an incoming link?
Flutter routes an incoming link by reading its path and mapping it to a screen. Once the platform hands the URL to the app, your router decides what to show, and unknown paths need a safe fallback.
A typical approach uses a declarative router that parses the URI into typed parameters. Define the supported paths in one table, reject anything else, and send the user to a safe screen when a record is missing. Custom software teams often build this layer alongside the back-end API, which is covered in custom software development services.
Where do deep links fail?
Deep links fail most often when verification breaks silently, because the browser opens and nothing looks wrong to the user. Each platform has its own failure points, and they are easy to miss without a device checklist.
- A redirect from http to https, or from a www host to a bare domain, can stop verification on either platform.
- A debug build signed with a different certificate verifies against the wrong fingerprint.
- A caching layer that serves an old association file delays changes for users.
- A rewrite rule that sends unknown paths to a single-page app shell can make the association file return HTML instead of JSON.
- A user without the app installed lands on the web page, which needs its own version of the same content.
The trade-offs are real. Verified links give a smoother experience but add release steps, because changes to the association files require server deployment. Custom schemes are quicker to set up but offer no ownership proof. For most business apps, verified HTTPS links are worth the extra configuration because they are the links that email, PDFs and partner portals already use. If deep links open records held in an ERP or CRM, the data path needs its own design, which is covered by system integration services.
Hypothetical examples of link routing
Here are two hypothetical scenarios:
In the first, a field service team receives an email with a link to a work order. The app opens on that order when it is installed. If the user is signed out, the router sends them to login and then returns them to the same order, so the link is not lost.
In the second, a customer taps a link to an invoice on a phone without the app installed. The browser opens the web invoice page instead, and the same path works without a broken state. The team tests both paths before release, because the second case never reaches the Dart code.
What should a deep link release checklist include?
A release checklist should confirm both association files, both signing configurations and the router mapping before any user taps a link. Work through it on a physical device for each platform.
- Association files are reachable over HTTPS with no redirects.
- Android fingerprints cover both the release signing key and the store signing key.
- The iOS Associated Domains entitlement matches the production domain.
- Every supported path maps to a screen, and unknown paths fall back safely.
- Signed-out users are sent to login and then back to the target screen.
- Links from email, messaging and PDFs are tested on both platforms.
Frequently Asked Questions
Do Flutter deep links require a domain I own?
Yes, verified App Links and Universal Links require a domain you control, because both platforms check a file published on that domain before they open your app. Custom URI schemes need no domain, but they cannot prove who owns the link. A subdomain dedicated to links is often enough, provided it serves HTTPS and both association files.
Why does my deep link open in the browser instead of the app?
The most common cause is that verification has not succeeded on that device, so the system falls back to the browser. Check that the association file is reachable without redirects, that the fingerprint or team identifier matches your build, and that the app was reinstalled after the file changed. Test on a physical device, because simulators and debug builds can behave differently.
Can one Flutter codebase handle deep links on both Android and iOS?
Yes, the routing logic in Dart is shared across both platforms, because the operating system delivers the URL to the same router. The platform configuration stays separate: Android needs its manifest and assetlinks file, and iOS needs the Associated Domains entitlement and the association file. Plan for two configuration checklists even with one codebase.
Are custom URI schemes a replacement for App Links?
No, custom URI schemes are a fallback for specific cases rather than a replacement. They are simpler to set up because they need no server file, but any installed app can register the same scheme, so they do not prove ownership. Verified HTTPS links are the better default for links shared by email, documents or partners.
Do deep links change how users sign in?
Deep links do not change authentication, but a careless router can skip the sign-in path a user expects. Protected screens should always check the session and send signed-out users to login before returning them to the target screen. Never place tokens or sensitive data in the URL itself.
Conclusion
Flutter deep links work when the platform configuration, the server files and the router agree. Android App Links and iOS Universal Links are verified separately, so test each one on a physical device and cover the failure cases before release. Start with a small set of paths, map them clearly and add more once verification is stable. If your team needs help planning this for a Flutter business app, request a project consultation at the Rui Codex contact page. Rui Codex is led by a founder with 200+ projects delivered, and published work is listed in the case studies.
Sources
- Deep linking - Flutter documentation
- App links - Android Developers
- Supporting associated domains - Apple Developer
- Universal Links - Apple Developer