SiteCheck

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?

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.

  1. Choose a registrar you trust (for example Cloudflare Registrar, Namecheap, Porkbun or GoDaddy) and create your own account there. Keep that login private.
  2. 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.
  3. Buy only the domain. You do not need extra hosting, website builders or email add-ons for the site we build.
  4. Use your own email address as the owner contact, so you can recover the domain later.
  5. 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:

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.

  1. In your Cloudflare dashboard, add your domain to your account. Cloudflare shows you two nameservers.
  2. Before you switch, check that the DNS records you rely on (especially email records) exist in Cloudflare, or your email could stop working.
  3. Go to your registrar and replace the domain's nameservers with the two Cloudflare gave you.
  4. Wait until Cloudflare shows the domain as Active (see waiting time).
  5. 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.

  1. First, in your Pages project open Custom domains > Set up a domain, type www.yourbusiness.com and continue. (Do this step before touching DNS.)
  2. Then, at your DNS provider, add a record: Type CNAME, Name www (some providers want the full www.yourbusiness.com), Target <your-project>.pages.dev. We tell you the exact project name.
  3. 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

Warning: a 522 error. If you add the DNS record (the CNAME) before attaching the domain in your Pages project, the domain fails to load and shows a 522 error. Always attach the domain in the Pages project first, then add or confirm the DNS record.
  1. Domain bought or already owned.
  2. Attach the domain in the Pages project (Custom domains > Set up a domain).
  3. Add the DNS record (the CNAME for www), or finish the nameserver change for a plain domain.
  4. 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.

Get a new websiteBack to the setup guide