Devops
Hosting
Custom Vercel domain with Cloudflare

Custom Vercel domain with Cloudflare

  1. Sign up and sign in to Cloudflare https://dash.cloudflare.com/sign-up (opens in a new tab).

  2. In your Cloudflare dashboard, select the Domain Registration > Register Domains tab.

  3. Search for your favorite domain and purchase it. In my case, I purchased the domain https://aidenthenotorious.com (opens in a new tab) for my blogs and documents.

  4. Sign in to Vercel and go to your dashboard, where you can see all your projects in the Overview tab.

  5. Click on a project and on the top right, select Domains.

  6. Type your domain in the text box, e.g., aidenthenotorious.com, and click Add.

  7. Select the recommended option from Vercel: Add www.aidenthenotorious.com and redirect aidenthenotorious.com to it.

  8. Vercel will show an invalid configuration under your domains and display the relevant A record IP under aidenthenotorious.com and a CNAME IP under www.aidenthenotorious.com. These need to be set up on Cloudflare to make it work.

  9. Go to the Cloudflare dashboard and select Domain Registration > Manage Domains tab.

  10. Your domain will be listed in a table. Select Manage.

  11. Look for Update DNS configuration under the quick actions.

  12. Add an A record (turn off proxy) with the information provided by Vercel in the above step:

  • IPv4 address should be provided by Vercel at step 8
TypeName(required)IPv4 address(required)Proxy status
A@89.28.116false
  1. Continue to add a CNAME record (turn off proxy):
TypeName(required)IPv4 address(required)Proxy status
CNAMEwwwcname.vercel-dns.comfalse

You're done! Wait a minutes for all the job done, and visit your domain, and you should now see your project live and accessible.