Point Namecheap Domain to Vercel: Custom DNS Setup Guide

by Fahim

Connecting a custom Namecheap domain to Vercel should take about three minutes. Yet almost every time I set this up for a project, I see people stuck on an “Invalid Configuration” screen because of lingering parking records or a botched redirect. I ran into this exact headache migrating a client’s Next.js app away from registrar defaults.

You have two ways to wire them up: keep your DNS at Namecheap and point A and CNAME records to Vercel, or delegate your nameservers entirely. I will walk through both options, show how I configure apex-to-www redirects, and share the terminal commands I use to troubleshoot propagation when things look stuck.

Terminal screen showing DNS query commands and A record routing for a Namecheap domain to Vercel
Terminal screen showing DNS query commands and A record routing for a Namecheap domain to Vercel

The Setup I Tested

For this walkthrough, I used a standard Next.js deployment on Vercel and a domain registered on Namecheap. We want two endpoints working together: the apex domain (example.com) hitting Vercel’s global anycast IP, and the www subdomain (www.example.com) aliased to their edge network with an automatic 308 redirect.

Before touching your registrar dashboard, add the domain inside Vercel first. Head to Settings > Domains, type in your domain name, and pick the recommended redirect rule.

If you prefer the command line, you can add it directly via the Vercel CLI from your repository root:

# Add apex domain and standard www redirect via Vercel CLI
vercel domains add example.com
vercel domains add www.example.com

Once added, Vercel shows the exact DNS targets it needs for verification. Leave that tab open while we switch over to Namecheap.

Option 1: Configuring A and CNAME Records in Namecheap BasicDNS

Using Namecheap BasicDNS is the cleanest route if you already have third-party email hosting (like Google Workspace or Fastmail), custom subdomains, or transactional services tied to your domain. You keep all your records in one place without moving the entire DNS zone.

Log in to Namecheap, open your Domain List, click Manage next to your domain, and make sure Nameservers is set to Namecheap BasicDNS. Then jump to the Advanced DNS tab.

First, delete any default parking records (look for URL Redirect entries or parked A records pointing to Namecheap’s default IPs). If you leave those in place, they will conflict with Vercel. Next, add these two records:

  1. Apex A Record: Type: A Record | Host: @ | Value: 76.76.21.21 | TTL: 1 min (or Automatic)
  2. WWW CNAME Record: Type: CNAME Record | Host: www | Value: cname.vercel-dns.com. | TTL: Automatic

If you are wondering why we use an A record for the root instead of a CNAME, check out our breakdown on pointing root domains in Namecheap DNS for the technical details.

Option 2: Delegating Nameservers to Vercel

If you prefer Vercel to handle all DNS routing, automated preview domains, and wildcard subdomains automatically, you can delegate your nameservers straight to Vercel.

In your Namecheap dashboard under the main Domain tab, scroll down to Nameservers. Switch the dropdown from Namecheap BasicDNS to Custom DNS, then add Vercel’s nameserver addresses:

# Vercel authoritative nameservers
ns1.vercel-dns.com
ns2.vercel-dns.com

Click the green checkmark to save. Keep in mind: once you delegate nameservers, Namecheap stops answering DNS queries for your domain. If you have MX or TXT records for email, copy them into Vercel’s DNS dashboard before flipping the switch, or your inbound mail will drop.

If keeping email working is your top priority, check out our guide on how to manage DNS records without breaking existing email routing.

Handling the Apex to WWW Redirect in Vercel

You do not want your application serving identical HTML across both example.com and www.example.com—search engines treat that as duplicate content. Pick one canonical version and set a permanent 308 redirect on the other.

In Vercel under Project Settings > Domains:

  • Add both example.com and www.example.com to the project.
  • Click Edit on the version you want to redirect (for instance, example.com if you prefer www as your primary).
  • Select Redirect to and choose your primary domain from the dropdown.
  • Choose status code 308 Permanent Redirect.

Vercel handles this redirect right at the edge layer before calling any serverless functions, keeping latency under 15ms. You can check the full domain specs in the Vercel Custom Domains Documentation.

Testing DNS Propagation and SSL Handshake with Terminal Tools

Do not just hit refresh in your browser—local DNS caches lie. I always test directly against public resolvers using terminal tools to see what has actually propagated.

Run these dig queries against Google and Cloudflare DNS to check your apex and subdomain:

# Query Cloudflare DNS directly for the A record
dig @1.1.1.1 example.com A +short # Query Google DNS directly for the www CNAME
dig @8.8.8.8 www.example.com CNAME +short

The first query should return 76.76.21.21, and the second should resolve to cname.vercel-dns.com.. Once both resolve, run a curl command to verify the HTTP redirect headers and Let’s Encrypt SSL handshake:

# Inspect headers and TLS certificate chain
curl -Iv https://example.com 2>&1 | grep -E "(HTTP/|location|issuer|subject)"

A clean configuration returns a response like this:

* Server certificate:
* subject: CN=example.com
* issuer: C=US, O=Let's Encrypt, CN=R3
< HTTP/2 308 < location: https://www.example.com/

The Verification Error Gotcha: TXT Records and Conflicting CAA

When I first connected this domain, Vercel gave me an error: “Domain configuration invalid: Ownership verification required”. This usually happens when the domain was previously attached to a different Vercel account or DNS propagation is lagging.

You can bypass this immediately by adding an ownership TXT record in Namecheap’s Advanced DNS tab:

  • Type: TXT Record
  • Host: _vercel
  • Value: (Paste the verification code from your Vercel domain settings)
  • TTL: 1 min

Check that the TXT record is live using dig:

# Check the Vercel ownership verification TXT record
dig @1.1.1.1 _vercel.example.com TXT +short

Another common blocker is a restrictive CAA (Certification Authority Authorization) record. If you previously configured security records in Namecheap, make sure Let’s Encrypt is permitted to issue certificates. For a full walkthrough on record validation, check our guide on configuring security and validation records in Namecheap DNS.

As documented in the MDN Web Docs DNS Reference, having no CAA records allows any CA to issue certificates, but an explicit CAA record that leaves out Let’s Encrypt will block Vercel from provisioning your free SSL certificate.

Frequently Asked Questions

How long does it take for Namecheap DNS changes to reflect in Vercel?

If you set your TTL to 1 min on Namecheap BasicDNS, changes usually show up in Vercel within 5 to 15 minutes. Custom nameserver delegation takes longer—typically between 2 and 24 hours depending on global recursive caches.

Can I point subdomains like app.example.com or api.example.com to Vercel?

Yes. Add a CNAME record in Namecheap with Host set to your subdomain prefix (like app) and Value set to cname.vercel-dns.com.. Then add app.example.com to your Vercel project domains. If you are running multiple backends, see our tutorial on routing subdomains to different servers in Namecheap.

Do I need to pay for an SSL certificate on Namecheap?

No. Do not buy PositiveSSL or commercial add-ons for your Vercel site. Vercel provisions and automatically renews free SSL certificates through Let’s Encrypt as soon as your DNS records pass verification.

Why is my domain showing a Namecheap parking page after updating DNS?

Your local machine or browser is caching the old IP from Namecheap’s parking records. Flush your local DNS cache with sudo dscacheutil -flushcache (macOS) or ipconfig /flushdns (Windows), or test using an incognito window.

What to Configure Next

Once your domain resolves cleanly and your SSL certificate is active, double-check your production environment variables and security headers. If you are also deploying static docs or secondary builds elsewhere, take a look at our guide on pointing Namecheap domains to GitHub Pages to manage multi-host domain routing cleanly.

all_in_one_marketing_tool