Cloudflare Pages With Google Domain: https root domain

I do not own or have any affiliation to MYSITE, I am using MYSITE purely as a stand-in domain for the purposes of this post.

I have registered my domain, which I will call MYSITE.com with Google Domains. I want to maintain my registration with Google Domains but host using Cloudflare Pages. My Cloudflare Pages site we will refer to as MYSITE.pages.dev in this post, however I have no affiliation with nor am I the owner of that exact Cloudflare Pages site.

At the moment if I visit https://www.MYSITE.com, the website works. If I visit http://MYSITE.com, I am redirected to https://www.MYSITE.com and the website works. However, if I visit https://MYSITE.com my browser states that it cannot connect to the server.

I have changed my settings on Google Domains so as to have Custom Name Servers specified as anirban.ns.cloudflare.com and zita.ns.cloudflare.com. Please help me confirm this is correct: I am told that I can confirm this in the cloudflare dashboard but I cannot find documentation on where this information is nor can I find the correct Cloudflare name servers directly in the Cloudflare dashboard . The Google Domains webpage user interface specifies Custom name servers (Active) when I view the Custom Name Servers page in their administration user interface. I made this change slightly less than 24 hours ago.

I also have a CNAME entry in the Default name servers section of the Google Domains web admin interface, but note that Google Domains tells me “Your domain isn’t using these settings” when I view the Default name servers section of their web admin interface, so I am assuming this setting is irrelevant. The CNAME entry has a host name of www.MYSITE.com and data of MYSITE.pages.dev

Unfortunately Google Domains’ support is not giving me enough information to sort this out or understand what if anything is missing from the configuration, so if you could please close the gap here rather than referring to them I would greatly appreciate it, especially since I am operating under a fairly strong time crunch.

Thanks!

These should correspond with the bottom of the DNS settings page for your domain at dash.cloudflare.com

It sounds like you have proper DNS entries for www and mysite.com

They both should be set to :orange: Proxied.

In SSL/TLS → Edge Certificates, you should have enabled “Always Use HTTPS” and “Automatic HTTPS Rewrites”

You should also have a Page Rule like this:
Match: www.mysite.com/*
Setting: Forwarding URL (301) to: https://mysite.com/$1

That should get everything working similiar to a handful of sites I have that use Pages and don’t use www for the canonical URL.

Please do keep in mind that Cloudflare is not my registrar for the MYSITE.com domain, Google Domains is. I don’t see the “DNS settings page” on dash.cloudflare.com. I see on the left hand side, Websites, Registrar, Account Analytics, Pages, Workers, Stream, Images, Security Center, Teams, Web Analytics, Carbon Impact Report, Bulk Redirects, and Manage Account. I have clicked around on some of these, including Registrar, Pages, and Manage Account but cannot find DNS settings page.

By the way, in the Pages section of the dashboard UI, if I go to Custom Domains, Cloudflare will ask me to transfer my domain to Cloudflare if I specify MYSITE.com as the domain, but not if I specify www.MYSITE.com. That might be relevant.

You need to go the “Websites” part to get to your domain.

The Cloudflare Dashboard Website section says I “currently don’t have any websites”.

In that case, Cloudflare has nothing to do with anything at MYSITE.com

If you need specific guidance, please post the actual domain name.

Would it be possible to get direct and more private support from cloudflare? I tried a week ago to reach out to support but didn’t hear back from support or from my Community Manager. Thanks!

Certainly. Please refer to Plan Features for the levels of private support on paid plans.

From https://www.cloudflare.com/plans/applicationservices/#overview :

So it looks like I need to manually add a website on the Cloudflare Dashboard as a first step here after configuring Google Domains to point at the Cloudflare name servers. Cloudflare doesn’t automatically detect this–that would be a good feature. To do this I went to the Websites section of the UI and typed in my domain name. I’ll try to make your directions above work now.

1 Like

So now MYSITE.com works but www.MYSITE.com does not!

here are the DNS records:
type: CNAME name: MYSITE.com content: MYSITE.pages.dev Proxy status: Proxied TTL: Auto
type: CNAME name: www content: MYSITE.pages.dev Proxy status: Proxied TTL: Auto

Any thoughts on making the www hostname work (e.g. www.MYSITE.com) on my site along with the bare root domain (MYSITE.com)?

You need to choose one to be canonical. Since ‘www’ doesn’t work (and I redirect those anyway), I’d go with something like this:

Not sure if you figured it out , but if you are doing what I think, where you added the cname for www. But don’t want to transfer DNS to Cloudflare, the redirect from domain.com to www.domin.com needs to redirect to https://www.domin.com then both http and HTTPS will redirect