Domain guide
Your own domain name
A custom domain (like yourbusiness.com) is optional. Pick the option that matches you, then follow the steps in order: the order matters.
Which option are you?
No domain yet
The free <name>.pages.dev address is fine for now.
I want to buy one
You buy it from a registrar. About $10-15 a year, not included in our price.
I already own one
Point it at your new site: nameservers or a www CNAME.
Before you start: you need your own free Cloudflare account and our invitation done (setup guide). The domain must be set up in your Cloudflare account, not ours.
No domain: the free address is fine for now
Your website will be reachable at <name>.pages.dev, a free address that Cloudflare gives your project. Nothing else to do. You can add your own domain later without rebuilding the site: come back to this page and follow "I already own a domain" or "I want to buy one".
I want to buy a domain
You buy and own the domain. A registrar is a company that sells domain names. You pay them directly, usually every year: roughly $10-15 a year for common endings such as .com (some endings cost more, and renewal prices can differ from the first-year price). The domain is not included in our price.
- Choose a registrar you trust (for example Cloudflare Registrar, Namecheap, Porkbun or GoDaddy) and create your own account there. Keep that login private.
- Search for the names you gave us (names are often taken, so have 2 or 3 options). Look at the price and the yearly renewal price.
- Buy only the domain. You do not need extra hosting, website builders or email add-ons for the site we build.
- Use your own email address as the owner contact, so you can recover the domain later.
- Tell us the name you bought, then continue with "I already own a domain" below. Do not change any DNS settings yet until you have read the order of steps.
I already own a domain
Tell us the domain name and, if you know it, which registrar or DNS provider it is with. Then decide which address visitors should type:
- The plain domain (
yourbusiness.com): follow nameservers. The domain must be added to your Cloudflare account and its nameservers pointed to Cloudflare. - A www address (
www.yourbusiness.com): follow the CNAME steps. No nameserver change is needed.
Not sure? The plain-domain route is the most complete one. The www route is the lighter touch if you want to keep your DNS and email exactly where they are.
Plain domain (yourbusiness.com): point the nameservers to Cloudflare
Cloudflare Pages needs a plain ("apex") domain to be a zone on your Cloudflare account, which means its nameservers must point to Cloudflare. Cloudflare then creates the right DNS record for you.
- In your Cloudflare dashboard, add your domain to your account. Cloudflare shows you two nameservers.
- Before you switch, check that the DNS records you rely on (especially email records) exist in Cloudflare, or your email could stop working.
- Go to your registrar and replace the domain's nameservers with the two Cloudflare gave you.
- Wait until Cloudflare shows the domain as Active (see waiting time).
- Then, in your Pages project, open Custom domains > Set up a domain, type your domain and select Continue. Because the nameservers point to Cloudflare, it creates the CNAME record for you.
A www address: add a CNAME
A subdomain such as www.yourbusiness.com does not need to be on Cloudflare. You add a CNAME record at your current DNS provider that points to your project's free address.
- First, in your Pages project open Custom domains > Set up a domain, type
www.yourbusiness.comand continue. (Do this step before touching DNS.) - Then, at your DNS provider, add a record: Type
CNAME, Namewww(some providers want the fullwww.yourbusiness.com), Target<your-project>.pages.dev. We tell you the exact project name. - If your domain is already on your Cloudflare account, the record is added automatically once you confirm it.
A bare domain (yourbusiness.com with no www) cannot use this route. Some registrars offer a forward from the bare domain to the www address, or you can use the nameserver route.
Do the steps in this order
- Domain bought or already owned.
- Attach the domain in the Pages project (Custom domains > Set up a domain).
- Add the DNS record (the CNAME for www), or finish the nameserver change for a plain domain.
- Wait for the domain to become active, then test it.
Please do not switch a domain's DNS back and forth once it is set up: if the record is pointed somewhere else and then back, visitors can see errors until Cloudflare marks the domain active again. To send visitors elsewhere for a while, ask us: a redirect rule is safer.
DNS waiting time
After a nameserver or DNS change, it can take a while for the whole internet to notice: often minutes or hours, and sometimes up to about 24-72 hours. This waiting time is out of everyone's hands, so it does not count against our delivery time. Your site keeps working at its free <name>.pages.dev address meanwhile.
CAA records (only if you have them)
A CAA record limits which companies may issue a security certificate (the padlock) for your domain. If your domain has CAA records that do not allow Cloudflare, the certificate cannot be issued and adding the domain to your project can fail. If you or your registrar set CAA records, add ones that allow Cloudflare's certificate authorities. Cloudflare's example (replace example.com with your domain):
example.com. 300 IN CAA 0 issue "letsencrypt.org" example.com. 300 IN CAA 0 issue "pki.goog; cansignhttpexchanges=yes" example.com. 300 IN CAA 0 issue "ssl.com" example.com. 300 IN CAA 0 issuewild "letsencrypt.org" example.com. 300 IN CAA 0 issuewild "pki.goog; cansignhttpexchanges=yes" example.com. 300 IN CAA 0 issuewild "ssl.com"
If you never set CAA records, you can ignore this.