What's deep linking?
A deep link is a URL that points to a specific location within an app. When opened from any other app (e.g. a browser) it will open that installed app and take you to the right content. Deep linking is great for developers because it allows them to keep users within their apps. It's also great for users because it provides a more seamless experience free of the many distractions that come from browsing the web with Chrome, Edge, or Safari.
Deep links and PWA
Since a PWA is essentially a web app that can be installed just like any other native app, it should be easy to deep link into it, correct? It turns out that the answer varies across platforms.
Android
On Android, deep linking is the default behavior. As long as the target URL is in the scope of an installed PWA, the system will open that installed PWA β unless it isn't already installed, in which case it will open your default browser.
The following actions will deep link into the PWA:
Scanning a QR code from a scanner app
Clicking on a link sent by a contact in an instant-messaging app
Tapping on a push notification received in the notification tray
Opening an HTML A link with target="_blank" (set to open in a new tab) from a browser
The following actions will open the page in the browser:
Opening an HTML A link without target="_blank" (opens in the same tab) from a browser will keep the action in the same browser tab
iOS
On iOS, it is simply not technically possible (as of late 2024) to deep link into a PWA. Even if a URL is in the scope of the PWA, iOS just always opens web links with Safari (except from push notifications with iOS 16.4+)
Desktop
Desktop platforms also support deep linking, but not as well as Android:
The following action will deep link into the PWA:
Tapping on a push notification in your Windows Notification Area or macOS Notification Center
The following actions will open the page in the browser:
Opening any link in your browser β with or without target="_blank"
Clicking on any link from any other installed native app or PWA