1. Add new domain from Vercel
Go to Settings
and click Add
.
Add your domain name (i.e. example.com
) and select Production
as the Environment. Then click Add Domain
.
Select the Recommended approach which is to add www.example.com and redirect to example.com to it.
2. Add Vercel to Namecheap
You'll notice that on Vercel, there will be Invalid Configuration for example.com and www.example.com. To fix this you have to add the two records provided by Vercel.
Now navigate to namecheap.com and log in. Either from Dashboard
or Domain List
, find your custom domain and click Manage
.
Then click on Advanced DNS
and add the records provided on the Vercel dashboard. At the end, your page should look like the following.
You'll notice pretty quickly that your Vercel dashboard will say Valid Configuration
if everything is set up properly.