Skip to content

Guides

ERR_UNKNOWN_URL_SCHEME: Fix WhatsApp, Call and Email Links in a Website App

Your WhatsApp or call button works in Chrome and shows an error page in your app. Here is why, which layer fixes it, and a link-by-link test to run before you publish.

11 min read

ERR_UNKNOWN_URL_SCHEME on a WhatsApp link in your app means the app's WebView tried to load a link such as whatsapp://, mailto: or intent: as if it were a web page, and it cannot. The proper fix is in the app: it has to catch links that are not http or https and hand them to the matching app on the phone. As the site owner, you can also reduce the risk by using ordinary https links where a service offers one.

What does net::ERR_UNKNOWN_URL_SCHEME mean in an app?

The "scheme" is the part of a link before the first colon. Web pages use http and https. Links meant to open another app use something else: mailto: for email, tel: for a phone number, whatsapp: for a WhatsApp deep link, market: for Google Play.

An app built from a website usually shows your pages inside Android's WebView component. Google's guide to WebView click behavior, written for apps that show ads, says WebView doesn't support custom URL schemes, such as a market:// link. If nothing in the app steps in, the user can get a "Web page not available" screen showing net::ERR_UNKNOWN_URL_SCHEME. Your page and your hosting are usually fine.

This is different from ERR_CLEARTEXT_NOT_PERMITTED, which is about a plain http:// address being blocked. Here the address is not a web address at all.

Search your theme, plugins, footer, contact page and checkout for these. Floating chat buttons and "share" widgets are easy to miss because a plugin writes the link for you.

Link types to search for on your site, and what to check for each
Link starts withTypical useWhat should happen in the appWhat you can change on the site
tel:Call now buttonsThe phone's dialer opensNothing to swap it for. The app has to handle it
mailto:Email us linksAn email app opensOffer a contact form as well
whatsapp:Chat or share buttonsWhatsApp opensUse a https://wa.me/ link, then test it
geo:Open in mapsA maps app opensTest, or link to a https map page
market:Rate or install linksGoogle Play opensUse the https Play Store listing address, then test it
intent:App launch buttons, often from third-party scriptsThe target app or a fallback page opensAsk the script's provider for a https option
Another app's own name, such as upi: or a brand schemePayment and login hand-offsThat app opens and returns the userTest the whole round trip with a real account

How do I fix ERR_UNKNOWN_URL_SCHEME for WhatsApp links?

Start with the link itself. WhatsApp's click to chat help documents the format https://wa.me/ followed by the full number in international format, with no plus sign, leading zeros, brackets or dashes. A prefilled message goes after ?text= and must be URL-encoded. For example: https://wa.me/15551234567?text=I%20have%20a%20question (a made-up number).

Because that link starts with https, the WebView can request it like any page, so it does not raise the error on the first tap. It is not a guaranteed cure. The page it loads can then try to hand off to the WhatsApp app, and if your app does not handle that second step you may still see the error or stay on a web page. Test it on a phone rather than assuming.

For tel:, mailto: and anything with no https equivalent, the app has to do the work. Hiding the button inside the app is better than leaving one that leads to an error, but treat that as a stopgap.

What does the app need to do?

If you or a developer control the app's code, the place is the WebViewClient method called shouldOverrideUrlLoading, which runs when the WebView is about to load a link. Google's sample follows this logic:

  1. 1

    Check the scheme

    If the link is http or https, apply your normal rules for what stays inside the app.

  2. 2

    Hand other schemes to Android

    For anything else, create a view intent from the link and ask Android to start an app that can open it.

  3. 3

    Catch the missing-app case

    Wrap that call so a phone with no matching app does not crash yours. Google's sample catches ActivityNotFoundException.

  4. 4

    Tell the WebView you handled it

    Return true, so the WebView does not also try to load the link and show the error page.

Show a short message when no app can open the link; a button that silently does nothing looks broken too. Do not pass every unknown link through without thought if your pages carry third-party content such as ads or user posts. Decide which schemes your app should allow.

An intent: link is a longer instruction that can name the target app and a backup web page. Chrome's intent documentation describes an S.browser_fallback_url value that sends the user to a web address when Chrome cannot launch the app. That behavior belongs to Chrome. Do not expect your WebView app to follow it by itself: the app has to read the intent link and the fallback and act on them. A plain view intent, as used for tel: or mailto:, is not enough for this format.

Chrome also says it won't launch an external app from an intent link without a user gesture. If a script on your site redirects to an app on page load, replace it with a button the visitor taps.

How do I test every link before publishing?

  1. 1List every non-web link on your site using the table above, including links added by plugins.
  2. 2Install the actual app build on a real Android phone. A desktop browser or Chrome on the phone will not reproduce the problem.
  3. 3Tap each link. Note whether the right app opens, an error page appears, or nothing happens.
  4. 4Press back or switch back to your app. You should return to the same page, with the cart or form intact.
  5. 5Repeat on a phone that does not have WhatsApp or the other target app installed, and check that the user gets a sensible result.
  6. 6Test links inside embedded frames and pop-ups separately, such as chat widgets and payment windows.

Google also publishes a test page of link types that you can load in your WebView. It was made for ad click testing, so use it alongside your own links, not instead of them.

Who should fix it if a builder made my app?

If you used a website-to-app builder, you normally cannot edit that method yourself. Send the builder the exact link that failed, the full error text, your Android version and a screenshot. Ask two direct questions: which link schemes does the app pass to other apps, and what happens with intent: links? If the answer involves a setting, change it, rebuild, and run the test again on the new build.

If the app is already on Google Play, the fix reaches users only through an updated build. A change you make to a link on your website shows up when the page reloads, which is why swapping to a https link can help while you wait.

Broken contact buttons are worth fixing before review as well. Our guides to why Google Play rejects WebView apps and optimizing a website for a WebView app cover the other things to check. If your goal is the reverse, making links from email or chat open your app, that is a separate setup called Android App Links.

Frequently asked questions

Why does my WhatsApp button work in Chrome but not in my app?
Chrome knows how to hand many app links to other apps. A WebView inside an app does not do that for custom schemes on its own, so the app has to catch the link and pass it to Android.
How do I fix net::ERR_UNKNOWN_URL_SCHEME for tel: or mailto: links?
The app needs to intercept links that are not http or https in shouldOverrideUrlLoading, start the matching app with an intent, handle the case where no app exists, and return true. Editing the website cannot do this for you.
Will a wa.me link stop the error?
It avoids the first failure because it is a normal https link. The page behind it can still try to open the app through another scheme, so test it in your own app build.
Can I fix the error without rebuilding the app?
Sometimes. If your site offers a https alternative, changing the link takes effect when the page reloads. Links such as tel: and mailto: depend on the app, so they need an app that handles them.
Is this a problem with my website or my hosting?
Usually neither. The error says the WebView does not recognize the type of link. It is not a server response and not a certificate problem.