Skip to content
CodeOnAir
← All posts

Why links open in the Instagram browser, not your app (and how to fix it)

Instagram, Facebook and other apps open links in their own browser, where Universal Links and App Links don't fire. Why it happens, what doesn't work, and the Open in app page that does.

CodeOnAir team27 October 20268 min read

Your Universal Links and App Links work. Tap one in Notes, Messages or Gmail and the app opens. Put the same link in an Instagram bio, a Facebook post or a LinkedIn message, and it opens a web page inside Instagram instead. Nothing is broken in your setup. The app hosting the link decides where it opens, and many apps keep links in their own browser.

This post explains which apps do this, why Universal Links and App Links don't fire there, what doesn't work as a fix, and the pattern that does: a page with an Open in app button, plus a store fallback that keeps the link's data through an install.

Which apps open links in their own browser

Many social and messaging apps open tapped links in a built-in browser (a web view) so people stay in the app. The common ones are Instagram, Facebook and Messenger, TikTok, LinkedIn, Snapchat, X (Twitter), LINE and the Google app. On Android, any app that loads pages in a plain WebView behaves the same way.

Branch keeps a list of how Universal Links behave in popular iOS apps (Branch's Universal Links page, checked 27 October 2026). It lists:

  • Works: Messages, Mail, WhatsApp, Gmail.
  • Works sometimes: Facebook, Messenger, Google, X (Twitter), LinkedIn, WeChat and apps using SFSafariViewController. Branch says these "work with Universal Links only when a webview is already open."
  • Doesn't work: Instagram, Pinterest, Telegram.

Apps change this behaviour between versions, so treat any list as a starting point and test the apps your users come from.

Why Universal Links and App Links don't fire inside them

iOS. A Universal Link opens your app when iOS handles the tap on an https:// link and finds your app's association for that domain and path. When an app loads the URL in its own web view, the navigation can stay inside that web view and iOS never makes the decision. Branch's page also notes that Universal Links "cannot be triggered via JavaScript" unless it's part of a user action, and don't work when a URL is pasted into the address bar.

Android. An App Link opens your app when Android receives a VIEW intent for the URL and finds your verified intent filter. A WebView loading a page doesn't send that intent unless the host app chooses to. So inside a web view, your verified link is just a web page.

In both cases the link reaches your link server as a normal web request, from the in-app browser. That's the part you control.

What doesn't work

  • Redirect chains. Bouncing through another https:// domain (a tracker, then your link domain) doesn't make the in-app browser hand the link to the OS. It just loads more pages.
  • Auto-redirecting to your custom scheme on page load. location.href = "myapp://..." without a tap is blocked by some in-app browsers and shows an error dialog in others. Chrome's intents documentation lists "a JavaScript timer tried to open an application without a user gesture" among the cases where it won't launch an app.
  • window.open and hidden iframes. They're treated as pop-ups or ignored, and an iframe pointing at a scheme fails silently.
  • Asking people to "long-press and open in Safari". Some will. Most won't.

What does work is a page that loads quickly, shows what the link is about, and has a button the user taps.

The pattern that works: detect the in-app browser, then an Open in app button

The link server reads the user agent. In-app browsers identify themselves there. These are the patterns CodeOnAir's link server checks, in order:

const IN_APP: [RegExp, string][] = [
  [/Instagram/i, "instagram"],
  [/FBAN|FBAV|FB_IAB|FBIOS/i, "facebook"],
  [/musical_ly|BytedanceWebview|TikTok/i, "tiktok"],
  [/\bLine\//i, "line"],
  [/Snapchat/i, "snapchat"],
  [/Twitter/i, "twitter"],
  [/LinkedInApp/i, "linkedin"],
  [/GSA\//i, "google_app"],
  [/\bwv\)/i, "android_webview"],
];

WhatsApp isn't on this list. Its link-preview crawler is treated as a bot: it gets the link's title, description and image, and isn't counted as a click. How WhatsApp opens a tapped link depends on the platform and app version, so test it yourself.

When the request comes from an in-app browser, the server doesn't redirect. It returns a small page with:

  1. The link's preview image, title and description, so the page makes sense on its own.
  2. Open in app: a custom scheme link on iOS (myapp://product/42?ref=bio), an Android intent URL on Android.
  3. Get the app: the App Store or Play Store.
  4. A tip: "if nothing happens, tap ••• and choose Open in browser".

The user's tap on Open in app is a real user gesture, so the in-app browser hands it to the OS, which opens your app. If the app isn't installed, Get the app goes to the store.

Android: intent:// URLs with a fallback URL. iOS: custom scheme from a user tap

On Android, the button is an intent URL. With a URI scheme set for your app, CodeOnAir builds:

intent://product/42?ref=bio#Intent;scheme=myapp;package=com.example.shop;S.browser_fallback_url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.example.shop%26referrer%3D...;end

package makes Android open your app, and S.browser_fallback_url is where to go if it isn't installed: here, the Play Store with a referrer that carries the click ID. Chrome documents both parts in Android Intents with Chrome. Without a URI scheme, the intent uses scheme=https and the link's own URL, which opens the app through its verified App Link.

On iOS there's no intent URL. The button uses your custom URI scheme, so you need one: without it, iOS users in an in-app browser only get Get the app. Register the scheme in the app (Xcode's URL Types, or "scheme": "myapp" in Expo's app.json), and enter the same scheme in CodeOnAir's AppLink setup, in the URI scheme field. The link debugger warns you when it's missing: add ?d=1 to any link to see "No uri_scheme: in-app browsers (Instagram, Facebook…) cannot open the app directly".

In the app, the React Native SDK parses scheme links locally into the same shape as every other link, so one handler covers all of them:

import DeepLink from "@codeonair/deeplink-react-native";

DeepLink.init();
DeepLink.onLink((link) => {
  // From Instagram via "Open in app": link.matchMethod === "uri_scheme"
  navigation.navigate(link.path, link.params);
});

If you're building this yourself, the logic is the same: check the user agent, render a page with a link (not a script) to the scheme or intent URL, and add a store link next to it.

Keep the link's data when the user installs from there

Someone who taps your Instagram link and doesn't have the app taps Get the app, installs, and opens it. That first open should still go to the product or offer they came for. That's deferred deep linking, and the in-app browser page doesn't get in the way:

  • The click is recorded before the page is shown, with the in-app browser noted.
  • Android: the Play Store link carries the click ID in the install referrer, so the first open is matched exactly.
  • iOS: the first open is matched on signals such as network address, OS version and time. With clipboard matching turned on, Get the app also copies a one-time token, which makes the match exact (iOS asks the user to allow the paste).

Testing inside Instagram and Facebook

Test where your links will really be tapped, on both platforms:

  • DM yourself the link in Instagram, then tap it in the chat.
  • Put it in your bio on a test account and tap it from the profile.
  • Add it to a story with a link sticker.
  • Post it on Facebook and send it in Messenger.
  • Try it from LinkedIn and X if your audience is there.

For each, check: does the page show the right title and image? Does Open in app open the app on the right screen? With the app uninstalled, does Get the app go to the store, and does the first open land on the right screen?

You can see the page without a phone by sending an in-app browser user agent:

curl -s -A "Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Instagram 350.0.0" \
  https://yourapp.codeonair.com/summer | grep -E 'id="(open|store)"'

If the links open the browser even from Notes or Messages, the problem is your setup, not the in-app browser. Work through Universal Links not working? An iOS checklist and Android App Links not verified?, and check your domain with the Universal Link and App Link Validator.

FAQ

Can I force Instagram to open links in Safari or Chrome?

Not from your link. The host app decides how links open. What you can do is give users a page with an Open in app button and the "tap ••• and choose Open in browser" tip.

Does this affect paid Instagram ads?

Ads that send people to a website URL generally open it in Meta's in-app browser, so treat them the same way, and check with a test ad on a phone before you spend. App install ads that go straight to the App Store or Play Store don't pass through your link.

Why does the link work from WhatsApp or Notes but not Instagram?

Notes, Messages and (per Branch's list) WhatsApp pass the tap to the system, so iOS or Android opens your app. Instagram loads the link in its own browser, so the system never sees it.

Do I need a custom URI scheme?

On iOS, yes, for the Open in app button: it's the only way to open the app from an in-app browser page. On Android, an intent URL works even without one, by opening the link's own verified App Link.

Will users see an extra page?

Only inside in-app browsers. In Safari, Chrome and the apps that pass links to the system, the link opens your app or the store directly. The exception is iOS clipboard matching, if you turn it on: iPhone users without the app then see a page with a Get the app button, because a page can only copy to the clipboard after a tap.

Get links that handle in-app browsers for you

CodeOnAir AppLinks detects in-app browsers, shows the Open in app page with the right scheme or intent URL, and keeps the link through the install. Create a free account: the Free plan includes 100 app links. Plans are on the pricing page.


Checked on 27 October 2026 against Branch's Universal Links support page and Chrome's Android intents documentation. In-app browser behaviour changes between app versions; test on your own devices.

Your first AppLink in five minutes.

Create an app, pick a subdomain, and share a link that opens your app. Try Growth free for 30 days — no card needed.