- Go to "Domains" section in Vercel
- Type out your domain, and click on "Add"
- It'll give you an "A" record to enter in the DNS settings
- Navigate to the Cloudflare dashboard
- From there go to DNS, and add the A record there with Proxy status being set to "true"
- I also had an "A" record which was pointing to Namecheap, since I bought the domain from there. Make sure to remove that.
- "A" record is basically an Address record that maps the domain name to the IP address of the computer hosting the domain
- Add a CNAME record to handle "www"
- Set "Name" to "www"
- Set "Content" to "domain.com"
- Set Proxy Status to true
- Now go to SSL/TLS settings
- Set encryption mode to "Full(strict)"
- Go to edge certificates, and turn off "Always use HTTPS"
- Now go to "Page rules"
- And add
*domain.com/.well-known/*and chooseSSLfor that setting and turn it "off" - This is required by Vercel to generate certificates
- And add
- Finally go to vercel and make sure you add both the versions of the domain
domain.comwww.domain.com
Last active
September 18, 2020 07:35
-
-
Save nikkaroraa/d4746b78d789f1c6621b9766fba4a4ef to your computer and use it in GitHub Desktop.
How to setup Vercel with Cloudflare?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment