Vercel Custom Domain DNS Configuration and Verification
Configuring your custom domain on Vercel requires updating your DNS records to point your domain name to Vercel's edge network. By setting up the correct A records, CNAME records, or shifting to Vercel's nameservers, you ensure your web applications load quickly and securely with automated SSL certificates. When troubleshooting propagation issues or verifying your setup, using the NS Lookup tool on XiaTools allows you to instantly check which IP addresses and nameservers your domain currently resolves to across public DNS resolvers.
Understanding Vercel DNS Options
Vercel offers two primary methods for connecting a custom domain: using Vercel Nameservers (recommended) or configuring Apex and CNAME records with your current DNS provider. Each method has distinct advantages depending on your infrastructure complexity and whether you host your email or other services on the same domain.
Method 1: Using Vercel Nameservers (Recommended)
Delegating your entire domain to Vercel simplifies configuration because Vercel manages all required DNS records automatically. This is especially useful if your project uses Vercel for your primary web traffic and you do not require complex sub-domain routing with external providers.
- Log in to your Vercel dashboard and navigate to your project settings.
- Click on the Domains tab and enter your apex domain, such as
example.com. - Vercel will prompt you to change your domain's nameservers at your registrar to a set of provided addresses, typically looking like
ns1.vercel-dns.comandns2.vercel-dns.com. - Log in to your domain registrar (where you originally bought
example.com), locate the nameserver management section, and replace your current nameservers with the Vercel values.
Method 2: Using Traditional DNS Records (Apex and CNAME)
If you must keep your current DNS provider because you manage corporate email (MX records), TXT verification records, or internal subdomains elsewhere, you can manually add specific DNS records.
- Apex Domain (
example.com): Requires anArecord pointing to Vercel's IP address (76.76.21.21). - Subdomain (
www.example.comorapp.example.com): Requires aCNAMErecord pointing tocname.vercel-dns.com.
Step-by-Step Configuration Example
Let's walk through configuring example.com and www.example.com using a traditional DNS provider interface (such as Cloudflare, Route 53, or GoDaddy).
Step 1: Add the Domain in Vercel
Navigate to your project dashboard, go to Settings > Domains, and add example.com. Vercel will automatically suggest adding www.example.com as well. Select the option to redirect www to the apex domain (or vice versa).
Step 2: Create the Apex A Record
In your DNS provider's dashboard, create a new record with the following parameters:
- Type:
A - Name / Host:
@(or leave blank to represent the root domain) - Value / Points To:
76.76.21.21 - TTL:
Autoor3600
Step 3: Create the CNAME Record for WWW
Create another record for your subdomain:
- Type:
CNAME - Name / Host:
www - Value / Points To:
cname.vercel-dns.com - TTL:
Autoor3600
Verification and Troubleshooting with Command Line Tools
Once your vercel domain name servers configuration is complete, you need to verify that global DNS servers recognize the changes. Propagation can take anywhere from a few minutes up to 24 hours depending on your previous TTL settings.
Using dig to Check A Records
Run the following command in your terminal to query your apex domain's A record:
dig example.com A +short
Expected Output:
76.76.21.21
Using nslookup for CNAME Verification
Verify that your www subdomain correctly points to Vercel's target:
nslookup -type=cname www.example.com
Expected Output:
Non-authoritative answer:
www.example.com canonical name = cname.vercel-dns.com.
Using PowerShell on Windows
If you are on Windows, you can use PowerShell to query specific nameservers to bypass local caching:
Resolve-DnsName -Name example.com -Server 8.8.8.8
Comparison of Vercel DNS Configuration Methods
| Feature | Vercel Nameservers | Manual DNS Records (A/CNAME) |
|---|---|---|
| Setup Difficulty | Very Easy | Moderate |
| Subdomain Management | Managed inside Vercel | Managed at DNS Registrar |
| Email Hosting (MX) | Requires manual addition in Vercel | Maintained at Registrar safely |
| SSL Provisioning | Fully Automated | Fully Automated |
| Propagation Speed | Fast | Depends on Registrar TTL |
Common Mistakes and How to Fix Them
- Conflicting A Records: Leaving old hosting provider IP addresses in your DNS panel alongside Vercel's
76.76.21.21record. Fix: Delete all legacyArecords pointing to other servers. - Proxied DNS Records: Enabling orange-cloud proxy services on DNS providers like Cloudflare for your Vercel apex domain. Fix: Set the status to DNS-only (grey cloud) so Vercel can handle SSL termination and traffic directly.
- Missing WWW Redirect: Forgetting to configure the canonical redirect, resulting in duplicate content indexing for
http://example.comandhttp://www.example.com. Fix: Configure the redirect preference in your Vercel domain settings panel.
Domain Configuration Checklist
- Added domain and subdomain in Vercel project settings.
- Created or updated A record (
76.76.21.21) or nameservers. - Created or updated CNAME record (
cname.vercel-dns.com). - Verified DNS propagation using terminal or online lookup tools.
- Confirmed valid SSL certificate generation inside the Vercel dashboard.