When deploying your Pages project, you may wish to point custom domains (or subdomains) to your site.
Add a custom domain
To add a custom domain:
- Log in to the .
- Select your account in Account Home > Workers & Pages.
- Select your Pages project > Custom domains.
- Select Set up a domain.
- Provide the domain that you would like to serve your Cloudflare Pages site on and select Continue.
Add a custom apex domain
To use a custom apex domain (for example,
example.com) with your Pages project, . If your nameservers are successfully pointed to Cloudflare, Cloudflare will proceed by creating a CNAME record for you.
Add a custom subdomain
If you are deploying to a subdomain, it is not necessary for your site to be a Cloudflare zone. You will need to to point the domain to your Cloudflare Pages site. To deploy your Pages project to a custom apex domain, that custom domain must be a zone on the Cloudflare account you have created your Pages project on.
Add a custom CNAME record
If you do not want to point your nameservers to Cloudflare, you must create a custom CNAME record to use a subdomain with Cloudflare Pages. After logging in to your DNS provider, add a CNAME record for your desired subdomain, for example,
shop.example.com. This record should point to your custom Pages subdomain, for example,
If your site is already managed as a Cloudflare zone, the CNAME record will be added automatically after you confirm your DNS record.
Delete a custom domain
To detach a custom domain from your Pages project, you must modify your zone’s DNS records.
First, log in to the Cloudflare dashboard > select your account in Account Home > select your website > DNS.
Then, in DNS > Records:
- Locate your Pages project’s CNAME record.
- Select Edit.
- Select Delete.
Next, in Account Home, go to Workers & Pages:
- In Overview, select your Pages project.
- Go to Custom domains.
- Select the three dot icon next to your custom domain > Remove domain.
After completing these steps, your Pages project will only be accessible through the
*.pages.dev subdomain you chose when creating your project.
Disable access to
To disable access to your project’s provided
Certification Authority Authorization (CAA) records allow you to restrict certificate issuance to specific Certificate Authorities (CAs).
To resolve this, add the necessary CAA records to allow Cloudflare to issue a certificate for your custom domain.
example.com. 300 IN CAA 0 issue "comodoca.com"example.com. 300 IN CAA 0 issue "digicert.com; cansignhttpexchanges=yes"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 issuewild "comodoca.com"example.com. 300 IN CAA 0 issuewild "digicert.com; cansignhttpexchanges=yes"example.com. 300 IN CAA 0 issuewild "letsencrypt.org"example.com. 300 IN CAA 0 issuewild "pki.goog; cansignhttpexchanges=yes"