andthezhang
7/23/2024
In Vercel, when adding a custom domain to a project, by default, the root domain (e.g., example.com
) is redirected to the www
subdomain (e.g., www.example.com
). This is a common practice to ensure that all traffic is directed to a single canonical domain.
But how to do it in Cloudflare? Here's a step-by-step guide to setting up a similar redirect in Cloudflare: