- 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.