Cloudflare Pages Custom Domain

Cloudflare Pages Create Custom Domain

  1. Register and create an account with Cloudflare. Choose Pages from sidebar and select your project.

    prefs createbucket

  2. When a project is created Cloudflare creates a subdomain using your project name for example youdocms.pages.dev. To link your domain if it is not hosted on CloudFlare edit the project and choose custom domain.

    cf-pages-edit-custom-domain_small.png

  3. In order to redirect requests to your main domain to the CloudFlare sub domain you will need to create a CNAME record in your providers DNS. Enter the domain name you require including the prefix. In our case we are using www5.youdocms.com as we are hosting the same site in multiple clouds for testing.

    cf-pages-domain-name_small.png

  4. Choose the option to create a CNAME record for your existing DNS provider. Note CloudFlare offers very competitive domain name hosting which is non-profit ie CloudFlare only charges the registrar fees. This is great value for money.

    prefs listbucket

  5.  Lastly copy the CNAME settings and create a new record with your DNS provider. Wait for the DNS changes to propagate and Use the check DNS button to verify the settings to make sure they are correct. 

    cf-pages-cname_small.png

  6. You will be notified by email when the DNS is updated and teh cusotm domain is active. To deploy your site see Cloudflare Depoyment.

    cf-pages-domain-active_small.png