-
Sign up and sign in to Cloudflare https://dash.cloudflare.com/sign-up.
-
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://nivethan.me/ for my portfolio.
-
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.,
nivethan.me
, and clickAdd
. -
Select the recommended option:
Add www.nivethan.me and redirect nivethan.me to it
. -
Vercel will show an invalid configuration under your domains and display the relevant A record IP under
nivethan.me
and a CNAME IP underwww.nivethan.me
. 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):
Type Name(required) IPv4 address(required) Proxy status A @ 89.28.116 off -
Add a CNAME record (turn off proxy):
Type Name(required) IPv4 address(required) Proxy status CNAME www cname.vercel-dns.com off -
You're done! Visit your domain, and you should now see your project live and accessible.
-
-
Save nivethan-me/a56f18b3ffbad04bf5f35085972ceb4d to your computer and use it in GitHub Desktop.
thanks for this, btw why proxy status off?
This ensures DNS queries result in Vercel serving the request instead of Cloudflare.
https://vercel.com/docs/integrations/external-platforms/cloudflare#disable-the-cloudflare-proxy
you miss ns2.vercel-dns.com setting in cf?
you miss ns2.vercel-dns.com setting in cf?
In Cloudflare i only added a A
record and a CNAME
record. thats it.
Check the docs for more clarity
https://vercel.com/docs/integrations/external-platforms/cloudflare#using-cloudflare-as-your-dns-provider
Thanks, bro ❤️
Thanks, what do i do if i'm getting a "too many redirects" when i try accessing my domain after I followed the instructions?
Thanks, what do i do if i'm getting a "too many redirects" when i try accessing my domain after I followed the instructions?
Faced this issue,
FIxed it by updating SSL/TLS in cloudflare from flexible to FULL or higher
credit : https://community.cloudflare.com/t/cannot-open-domain-with-vercel-app/648089/6
thanks~
thanks for this, btw why proxy status off?