Next.js Discord

Discord Forum

Cloudflare

Answered
Dax posted this in #help-forum
Open in Discord
Avatar
DaxOP
Can I use cloudflare ddos' systems while deploying with vercel? if so how? anyone do it?
Answered by B33fb0n3
yes you can. You need to set cloudflare as proxy.

Right now your connection path looks like this (simplified):
User -> Domain -> Vercel -> Content

After setting up cloudflare as proxy the connection path looks like this (simplified):
User -> Domain -> Cloudflare -> Vercel -> Content

As you can see, you change the name servers of your domain to the cloudflare ones and redirect from cloudflare to vercel. The rest stays the same.

Inside your DNS Config it could look like this (see attached):
A = your domain
Red Box = all subdomains if needed
Green Box = specific subdomain handled different by cloudflare
Blue box = "With Proxy"
Image
View full answer

3 Replies

Avatar
yes you can. You need to set cloudflare as proxy.

Right now your connection path looks like this (simplified):
User -> Domain -> Vercel -> Content

After setting up cloudflare as proxy the connection path looks like this (simplified):
User -> Domain -> Cloudflare -> Vercel -> Content

As you can see, you change the name servers of your domain to the cloudflare ones and redirect from cloudflare to vercel. The rest stays the same.

Inside your DNS Config it could look like this (see attached):
A = your domain
Red Box = all subdomains if needed
Green Box = specific subdomain handled different by cloudflare
Blue box = "With Proxy"
Image
Answer
Avatar
DaxOP
Thanks for the detailed answer!
Avatar
happy to help