Connection Issues with Android WebView and Custom DNS (AdGuard DNS) on Vercel-Hosted Subdomains

Hello Vercel Team,

I’m experiencing a CONNECTION_REFUSED error when trying to access Vercel-hosted subdomains via an Android WebView on devices using a custom DNS (specifically AdGuard DNS).

I’m currently using Namecheap DNS and have added three subdomains to Vercel, each linked to a separate branch. I configured each subdomain as a CNAME record pointing to cname.vercel-dns.com. on my Namecheap domain.

To explain in more detail:
I’m using the domain fairytech.ai with the subdomains cashback-ui.moment-dev, cashback-ui.moment-canary, and cashback-ui.moment.
In Vercel, I’ve set up these as cashback-ui.moment-dev.fairytech.ai, cashback-ui.moment-canary.fairytech.ai, and cashback-ui.moment.fairytech.ai.
On Namecheap, the fairytech.ai domain has three CNAME records for cashback-ui.moment-dev, cashback-ui.moment-canary, and cashback-ui.moment, each pointing to cname.vercel-dns.com..

Here are the screenshots from Vercel and Namecheap service.

Domain settings in Vercel

CNAME record settings in Namecheap

The setup works as expected when accessing these URLs through a browser from desktop or android WebView when custom DNS is off.
However, I’m experiencing an issue when trying to access these subdomains via an Android WebView, specifically on devices using a custom DNS (e.g., dns.adguard.com),
I receive a CONNECTION_REFUSED error in the onReceivedError callback.
I expect vercel deployed site is also accessible on devices using custom DNS.

Could you please advise on how to resolve this issue? Are there additional configurations I should consider for compatibility with custom DNS services?

Thank you for your assistance!

Deployment URL or Custom Domain: detail listed above
Environment (local, preview, production): 2 subdomains are preview, 1 subdomian is production
Project Framework: React app(accessed via Android WebView)
Build Settings:
  Framework Preset:
  Build Command (if not default):
  Output Directory (if not default):
  Install Command (if not default):
Node/Runtime Version:
Package Manager:
Relevant Packages:

Hi, @sarahshin0716! Welcome to the Vercel Community :smile:

Thanks for being patient with us :pray:

First, let’s verify your current DNS configuration:

  1. Your Namecheap DNS settings look correct. You’ve set up CNAME records for each subdomain pointing to cname.vercel-dns.com., which is the correct configuration for Vercel-hosted domains.
  2. Your Vercel domain settings also appear to be correctly configured, with each subdomain properly added to your project.

Given that the setup works correctly when not using a custom DNS, the issue likely lies in how AdGuard DNS (or other custom DNS services) are resolving these subdomains.

In addition to the CNAME records, try adding A records for each subdomain pointing to Vercel’s IP addresses. This can sometimes help with DNS resolution issues .

Add the following A records in your Namecheap DNS settings:

76.76.21.21
76.76.21.98
76.76.21.99

You can use a tool like DNS Checker to verify that your DNS records have propagated correctly across different DNS servers.

Let us know how you get on!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.