Custom Vercel domain with Cloudflare
-
Sign up and sign in to Cloudflare https://dash.cloudflare.com/sign-up (opens in a new tab).
-
In your Cloudflare dashboard, select the Domain Registration > Register Domains tab.
-
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.
-
Sign in to Vercel and go to your dashboard, where you can see all your projects in the Overview tab.
-
Click on a project and on the top right, select Domains.
-
Type your domain in the text box, e.g.,
aidenthenotorious.com
, and click Add. -
Select the recommended option from Vercel: Add
www.aidenthenotorious.com
and redirectaidenthenotorious.com
to it. -
Vercel will show an invalid configuration under your domains and display the relevant A record IP under
aidenthenotorious.com
and a CNAME IP underwww.aidenthenotorious.com
. These need to be set up on Cloudflare to make it work. -
Go to the Cloudflare dashboard and select Domain Registration > Manage Domains tab.
-
Your domain will be listed in a table. Select Manage.
-
Look for Update DNS configuration under the quick actions.
-
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
Type | Name(required) | IPv4 address(required) | Proxy status |
---|---|---|---|
A | @ | 89.28.116 | false |
- Continue to add a
CNAME
record (turn off proxy):
Type | Name(required) | IPv4 address(required) | Proxy status |
---|---|---|---|
CNAME | www | cname.vercel-dns.com | false |
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.