Back to posts
Feb 13, 2025
3 min read

Configuring a Custom Domain from Cloudflare for a Vercel Project

After finishing an awesome project and deploying it to Vercel, the next step is definitely to attach a branded domain instead of Vercel’s default domain. If you purchased your domain through Cloudflare, follow the steps below to get everything configured in just a few minutes.


1. Prepare Your Domain on Cloudflare


2. Add the Domain to Your Vercel Project


3. Configure DNS on Cloudflare (Critical Step)

After adding the domain, Vercel will show an Invalid Configuration error because you haven’t pointed the DNS yet. Here’s what to do:

A Record (For the root domain)

This information is provided by Vercel in step 7.

TypeNameIPv4 addressProxy status
A@IP from Vercel (e.g., 76.76.21.21)DNS only (Turn off the orange cloud)

CNAME Record (For the www subdomain)

TypeNameTargetProxy status
CNAMEwwwcname.vercel-dns.comDNS only (Turn off the orange cloud)

Extremely important note: You must turn off the Proxy status (switch from the orange cloud to the gray icon - DNS Only). If Proxy is enabled, Vercel may not be able to validate the SSL certificate and will keep showing a configuration error indefinitely.


4. Verify the Results


Summary & Notes

This combination lets you take advantage of Vercel’s powerful infrastructure and Cloudflare’s reliable DNS management.

A quick tip: After Vercel has successfully validated and issued the SSL certificate (usually a few minutes after showing Active), you can try re-enabling the Proxy (orange cloud) on Cloudflare if you want to use additional security features like DDoS Protection or Cloudflare’s CDN. However, if SSL errors occur, prioritize keeping it in “DNS Only” mode.

Related