How to Open URLs on Android from an App or a Web Browser


Opening a URL on Android sounds easy: tap a link, watch the page appear, go on with your life. Simple, right? Well, Android likes to keep things interesting. A link might open in Chrome, Firefox, Samsung Internet, Edge, an in-app browser, a native app like YouTube, a WebView inside another app, or a mysterious chooser screen asking you to make a decision before your coffee has kicked in.

The good news is that Android’s link-opening system is flexible on purpose. It lets users choose their preferred browser, lets developers send people to web pages or specific app screens, and gives websites a way to hand off certain links to installed apps. The slightly trickier news is that this flexibility can create confusion when links open in the “wrong” place.

This guide explains how to open URLs on Android from both sides: as a regular user tapping links in apps and browsers, and as a developer who wants to launch links properly from an Android app. We will cover default browsers, Android App Links, deep links, Custom Tabs, WebView behavior, intent URLs, troubleshooting, security, and practical examples you can actually use.

What Happens When You Open a URL on Android?

When you tap a web link such as https://example.com, Android checks what apps can handle that type of request. A browser can usually open standard web links. A verified app may open links for its own domain. A shopping app might open product pages. A maps app might open location links. Android then routes the URL based on your settings, the app’s configuration, and whether the destination app has permission to handle that link.

In plain English, Android asks: “Who is best suited to open this link?” If the answer is obvious, the link opens immediately. If several apps can handle it, Android may show a chooser. If you previously tapped “Always,” Android remembers that preference. If the app or browser has its own link settings, those can influence the outcome too.

Common Places URLs Open on Android

A URL on Android may open in one of these places:

  • Your default browser, such as Chrome, Firefox, Edge, Brave, or Samsung Internet.
  • A native app, such as YouTube, Instagram, Amazon, Gmail, or Google Maps.
  • An in-app browser, often seen in social media, messaging, and email apps.
  • A Chrome Custom Tab, which looks like a browser but stays visually connected to the app.
  • A WebView, where the app displays web content inside its own interface.
  • An Android chooser, where you pick which app should open the link.

How to Open URLs on Android from a Web Browser

If you are using Android as a regular user, opening URLs from a browser is usually straightforward. Open Chrome, Firefox, Edge, Samsung Internet, or another browser, type or paste the URL into the address bar, and tap Enter or Go. That is the easy version. The more useful question is how to control what happens after you tap a link.

Open a URL Directly in Chrome or Another Browser

To open a URL manually:

  1. Open your preferred browser app.
  2. Tap the address bar.
  3. Type or paste the full URL, such as https://www.example.com.
  4. Tap Enter, Go, or the arrow button on the keyboard.

If the URL is valid and your internet connection is working, the page should load. If it does not, check for typos, missing punctuation, blocked content, weak Wi-Fi, or a site that is temporarily down. Yes, sometimes the website is the problem. Your phone is innocent, at least this time.

Set Your Default Browser on Android

Your default browser controls which browser opens when another app launches a standard web URL. For example, if you tap a link in Messages or Gmail, Android usually sends that link to your selected default browser unless the app has its own built-in browser or link behavior.

To change the default browser on most Android phones:

  1. Open Settings.
  2. Tap Apps.
  3. Tap Default apps or Choose default apps.
  4. Tap Browser app.
  5. Select Chrome, Firefox, Edge, Samsung Internet, Brave, or another installed browser.

Menu names vary by manufacturer and Android version. On Pixel phones, this path is usually very close to Settings > Apps > Default apps. On Samsung phones, you may see additional menus or a three-dot menu before reaching default app settings.

Clear “Always Open With” Choices

If Android keeps opening a URL in the wrong app, you may have previously selected “Always.” To reset that behavior, clear the default settings for the app that keeps taking over.

  1. Open Settings.
  2. Tap Apps.
  3. Select the app that is opening links incorrectly.
  4. Tap Open by default or Set as default.
  5. Tap Clear default preferences or turn off supported link handling.

After clearing defaults, tap the link again. Android should ask which app you want to use. Choose carefully. Your future self will either thank you or mutter your name in frustration.

How to Open Links in Native Apps Instead of a Browser

Sometimes you want links to open in the app they belong to. A YouTube link feels better in the YouTube app. A Google Maps link works best in Maps. A product link may be easier to use in a shopping app. Android supports this through deep links and Android App Links.

What Are Android App Links?

Android App Links are verified web links that open directly in an app when the app and website have established a trusted relationship. For example, if a company owns both example.com and the Example Android app, it can configure App Links so certain website URLs open inside the app instead of the browser.

This verification matters because it prevents random apps from hijacking links they do not own. Without verification, Android may show a chooser or keep the URL in the browser. With verification, supported links can open directly in the intended app.

Turn On “Open Supported Links”

To manage whether an app opens supported links:

  1. Open Settings.
  2. Tap Apps.
  3. Select the app you want to manage.
  4. Tap Open by default.
  5. Turn on Open supported links, if available.
  6. Review the list of supported web addresses or domains.

If the app is verified for those domains, Android can send the matching URLs directly to the app. If the app is not verified or the website has not configured the link properly, Android may continue opening the URL in a browser.

Firefox and “Open Links in Apps”

Some browsers have their own link-opening settings. Firefox for Android, for example, includes an option called Open links in apps. Depending on your preference, Firefox can always open supported links in native apps, ask before opening, or never open links in apps.

To adjust it in Firefox:

  1. Open Firefox on Android.
  2. Tap the menu button.
  3. Go to Settings.
  4. Find the advanced link behavior settings.
  5. Choose whether links should open in native apps.

This is useful if links keep staying inside Firefox when you would rather open them in installed apps.

How Developers Open URLs from an Android App

For developers, opening a URL from an Android app usually means choosing between an external browser, a Custom Tab, a WebView, or a deep link. The best option depends on the user experience, security needs, and whether the content belongs to you.

Option 1: Open a URL with an ACTION_VIEW Intent

The classic Android method is to create an intent with ACTION_VIEW and a URL. Android then finds an app that can handle the URL.

This approach is clean, simple, and user-friendly. It respects the user’s default browser or app settings. If a verified app can handle the URL, Android may open that app instead of a browser.

For a safer implementation, handle the possibility that no suitable app is available:

That fallback is important. Most Android devices have a browser, but “most” is not the same as “guaranteed.” Developers who ignore edge cases eventually meet them in production, usually on a Friday afternoon.

Option 2: Use Android Custom Tabs

Custom Tabs are a great middle ground between launching a full browser and embedding a WebView. They let apps open web content in a browser-powered experience while keeping some app branding, such as toolbar color and close button behavior.

Custom Tabs are often ideal for:

  • Login pages and OAuth flows.
  • Articles, help pages, and documentation.
  • Checkout pages hosted on the web.
  • External links that should remain secure and browser-based.
  • Content that benefits from browser cookies, password managers, and security features.

A basic Kotlin example looks like this:

Custom Tabs feel fast and polished. They also avoid many of the security and compatibility problems that appear when developers try to make a WebView behave like a full browser. Spoiler: a WebView is not a full browser wearing a tiny hat.

Option 3: Use WebView for In-App Web Content

A WebView lets an Android app display web content directly inside its own interface. This can be useful for trusted first-party content, such as terms of service, help pages, internal dashboards, or simple web-based screens.

A basic example:

However, WebView should be used carefully. If your app displays untrusted pages, accepts arbitrary URLs, enables JavaScript unnecessarily, or allows unsafe file access, you can create security problems. A good rule: use WebView for content you control, and use Custom Tabs or a browser for external content.

Handling External Links Inside a WebView

If your WebView displays your own site but a user taps a link to another website, you may want to open that external URL in a Custom Tab or browser. Android’s WebViewClient provides shouldOverrideUrlLoading(), which gives the app a chance to decide what happens before a URL loads.

In this example, links within your own domain continue loading in the WebView. External links open outside the WebView. In a real app, use more precise host checking instead of a simple text match. URLs are sneaky little strings, and they love loopholes.

Deep Links, App Links, and Intent URLs: What Is the Difference?

These terms are related, but they are not identical. Understanding the difference helps developers and site owners build better Android link behavior.

Deep Links

A deep link is a URL or URI that opens a specific screen or feature inside an app. For example, a link could open a particular product, profile, playlist, or article. Deep links can use regular web URLs or custom schemes such as myapp://product/123.

Android App Links

Android App Links are a verified form of deep linking that use standard http or https URLs. They require configuration in the Android app and on the website. Once verified, matching links can open directly in the app without forcing users to choose.

Intent URLs

Intent URLs are special links used mainly from web pages to launch Android apps through Chrome and compatible browsers. They can include a target package, scheme, action, and fallback URL. A simplified example looks like this:

Intent URLs can be powerful, but they should be used thoughtfully. If no app can handle the intent, the browser should send the user to a useful fallback page instead of a dead end. Nobody likes tapping a link and landing in digital fog.

Best Practices for Opening URLs on Android

Respect the User’s Default Browser

Users choose default apps for a reason. If someone set Firefox, Edge, Brave, or Samsung Internet as their browser, your app should not unnecessarily force every link into Chrome or an internal WebView. The Android ecosystem works best when apps respect user preference.

Use Custom Tabs for External Web Content

For most external URLs, Custom Tabs provide the best combination of speed, security, and user experience. They feel integrated with your app but still rely on the user’s browser engine. This is especially useful for sign-in, payment, help, and article pages.

Use WebView Only When It Makes Sense

WebView is useful, but it should not become a dumping ground for every link your app encounters. Use it when you control the content and need a truly embedded experience. Avoid loading random third-party websites inside your WebView unless you have a strong reason and proper safeguards.

Validate and Encode URLs

Before opening a URL, make sure it is well-formed. Use Uri.parse() carefully, encode query parameters, and avoid building URLs through messy string concatenation. If user input becomes part of a URL, validate it. A broken URL is annoying; an unsafe URL is worse.

Handle Missing Apps Gracefully

When launching a deep link or external app, do not assume the target app exists. Provide a browser fallback, app store fallback, or helpful message. A graceful fallback turns a failure into a small detour instead of a support ticket.

Check Android Package Visibility Rules

On Android 11 and newer, apps have limited visibility into other installed apps. If your app needs to query whether another app can handle a URL, you may need to declare appropriate package visibility queries in the manifest. In many cases, simply launching the intent and catching the exception is cleaner than trying to inspect every installed app first.

Troubleshooting: Why Won’t a URL Open Correctly on Android?

The Link Opens in the Wrong Browser

Check your default browser under Android settings. Also check whether the app you are using has its own browser preference. Some email, messaging, workplace, and social apps include internal settings that may override or influence link behavior.

The Link Opens in a Browser Instead of the App

Open Android settings for the target app and look for Open by default. Make sure supported links are enabled. If the app does not appear as an option, it may not support that link, may not be verified for the domain, or may need an update.

The Link Opens in an App Instead of the Browser

Go to the app’s settings and disable opening supported links, or clear default preferences. Then try the link again and choose your browser when prompted.

A WebView Link Does Nothing

The URL may use a custom scheme such as market://, tel:, or an app-specific URI that WebView cannot handle by itself. Developers should intercept these URLs and launch the correct external intent when appropriate.

Intent Links Fail from a Web Page

An intent URL may fail if the target app is not installed, the URL has incorrect syntax, the app is not marked as browsable, or the launch was not triggered by a user action. Add a proper fallback URL and test on real devices, not just an emulator that has been living a sheltered life.

Practical Examples of Opening URLs on Android

Open a Website from an App

Use this when you want Android to choose the best available handler.

Open a Phone Link

This opens the dialer with the number filled in. It does not place the call automatically, which is better for user trust.

Open a Map Location

This can open Google Maps or another installed maps app, depending on the user’s device and defaults.

Open an Email Link

This opens an email app rather than showing a list of unrelated sharing apps.

User Experience Matters More Than Link Wizardry

The best Android URL behavior is almost invisible. Users tap a link, it opens where they expect, and nobody has to think about intents, schemes, handlers, or verification files. That is the goal.

For users, the key is knowing where default browser and supported link settings live. For developers, the key is choosing the right tool: intents for simple external opening, App Links for verified app destinations, Custom Tabs for polished web content, and WebView for carefully controlled embedded pages.

Avoid surprising people. Do not trap every link inside your app. Do not hijack links that should belong to another app. Do not make users re-login inside a tiny WebView if a Custom Tab can use their browser session. And please, for the sake of everyone’s thumbs, make fallback pages useful.

Experience Notes: What Opening URLs on Android Is Like in Real Life

In everyday Android use, link behavior often becomes noticeable only when something feels wrong. You tap a restaurant link in a text message and it opens in a browser instead of Maps. You tap a YouTube link and it opens a mobile web page even though the YouTube app is installed. You tap a work link and it opens in an in-app browser that does not remember your password. Suddenly, the simple act of opening a URL feels like asking a committee to choose lunch.

One common experience is the “wrong default browser” problem. A person installs a new browser to test it, taps “Always” once, and weeks later every link is still opening there. The fix is usually not reinstalling apps, restarting the phone, or giving the device a stern look. It is clearing default preferences or changing the default browser in Android settings. Once you know where that setting lives, the problem becomes much less dramatic.

Another real-world issue is in-app browsers. Social media and messaging apps often open links inside their own browser-like screens. This can be convenient because you can quickly return to the app, but it can also be frustrating. Password managers may not behave the same way. Browser extensions are usually unavailable. Saved sessions may not carry over. If a checkout, login, or form behaves strangely inside an in-app browser, opening the page in your real browser often solves the problem.

Developers see a different side of the same puzzle. A link that opens perfectly on one phone may open differently on another because the user has different apps installed, a different default browser, or a different Android version. Samsung, Pixel, Motorola, and OnePlus devices may label settings slightly differently. Browsers also make different choices. Chrome, Firefox, Edge, and Samsung Internet do not always handle app handoff in exactly the same way. Testing on multiple browsers and devices is not overkill; it is how you avoid angry reviews written with impressive punctuation.

For app teams, the best experience usually comes from matching the link destination to user intent. If the user is reading a help article, a Custom Tab feels smooth. If the user is opening a verified product page, an App Link into the app may feel faster. If the user is viewing a small first-party policy page, a WebView may be fine. If the user is going to a third-party site, a browser-based experience is safer and more respectful.

From a practical standpoint, the most reliable habit is to build and test fallbacks. What happens if the app is not installed? What happens if the domain is not verified? What happens if the user disabled supported links? What happens if the browser refuses to launch an app from a background script? Each fallback should give the user a clear next step. A fallback page that says “Open this in the app” with a browser option underneath is far better than a blank screen pretending everything is fine.

The final lesson is simple: Android gives users choice, and good URL handling honors that choice. Whether you are tapping links or coding them, the goal is not to force every URL into one perfect path. The goal is to open the right destination, in the right place, with the least friction. When that happens, nobody notices the link system at allwhich, in software, is often the highest compliment.

Conclusion

Opening URLs on Android can be as simple as tapping a link, but behind that tap is a smart routing system involving browsers, native apps, App Links, deep links, intents, Custom Tabs, and WebViews. Users can control much of the experience by setting a default browser, clearing old defaults, and managing which apps open supported links. Developers can create a better experience by respecting defaults, using App Links for verified destinations, choosing Custom Tabs for external web content, and treating WebView with care.

If a URL opens in the wrong place, do not panic. Check default apps, supported link settings, browser-specific options, and app-level preferences. If you are building an Android app, test link behavior across browsers, Android versions, and real devices. The best URL experience is fast, secure, predictable, and boring in the best possible way. Tap link, open page, happy human.