Learn how to use Dub to create deep links for your mobile app (with native support for React Native, iOS, and Android).
Add a custom domain
yourcompany.link
and use it as your deep link domain.Set up your deep link configuration files
/.well-known/
directory of your domain.To do that, go to your workspace domain settings and click on the edit button for your custom domain:Verify that your configuration files are set up correctly
Whitelist your deep link domain in your app
Enter your destination URL
https://
protocol – behind the scenes, Dub will automatically make sure it’s formatted correctly.This is the URL that opens a specific screen or piece of content within your app. For example https://yourapp.com/product/Apple-MacBook
opens the product detail screen for Apple-MacBook
.Set a short link slug
apple-macbook
to open the product detail screen for Apple-MacBook
.Add device targeting
Detect the deep link
https://yourdomain.link/short-link-slug
Track the deep link open
POST
request to the endpoint https://api.dub.co/track/open
with the following body:link.url
), you can navigate the user to the correct screen in your app.Here’s the full example code for React Native, iOS, and Android./track/open
Test on Android emulator
Test on iOS simulator
xcrun
command to test your deep links on an iOS simulator:Test on your device