Saturday, November 25, 2023

Google Sites Website and Cloudflare

Google Sites Website Custom Domain Name Not Working After Transferring/ Switching Custom Domain Name Into Cloudflare -

Edited March 8, 2024

This is for any of you out there that may be using Google Sites for your website using your own domain name AND getting it to work when you transfer to Cloudflare from [Google Domains in my case].


SHORT EXPLANATION


Give it TIME. It may take several hours. Most times the company you use say it MAY take up to 48 hours for changes to take effect. At the least, give it 4-6 hours before doing anything. Remember to clear your browsers cache and/or cookies so that you're not viewing un-updated site info.


In your Cloudflare Console:

  1. Leave your encryption mode set to 'Flexible'. Edit- 3/8/2024 - I originally thought this was necessary. I have since gone back and changed one of my domains to 'strict' and it works fine.
  2. Turn off / uncheck: "Always Use HTTPS Redirect all requests with scheme “http” to “https”. This applies to all http requests to the zone." It's (as of this writing) under SSL/TLS in Edge Certificates.
  3. For all your A and AAAA name records that transfer in use the Cloudflare Proxy EXCEPT with your 2 CNAME records ('www' and '_domainconnect').
  4. Create a forwarding rule that directs your naked domain to your www address.
  5. Sit back and relax. Give it 3-4 hours, maybe more, for all the new DNS stuff to propagate throughout the systems. It does not happen instantly. YOU HAVE TO WAIT.

LONG EXPLANATION

So, up until recently I've used Google Domains to register my domains and Google Sites to host my website. I'm not going to go into how this is done. This article assumes you already know how to, and have set up your Google Sites website to run with your own domain name.

My problem started recently because Google (Alpha?; not sure but will refer to them as Google throughout this post) sold off its Domains business to Squarespace. There's a big 'ole banner at the top of your dashboard in domains.google.com


So, I went over to Squarespace and bought 2 new domain names to mess around in and explore the service with. Setting up my domain in Squarespace to run my Google Sites website was fairly easy. I had minimal problems.

One of the things I did not like about Squarespace was their email forwarding. I like using catchalls. Squarespace does not allow you to set up a catchall forward; it only allows 100 email aliases which have to be set up individually to be forwarded. Since I like giving every business that requires an email their very own email, this is a huge inconvenience. So I decided to look around at other services.

I'm not sure how or why, but I found Cloudflare. So, I went through the process and transferred a domain from Google Domains to Cloudflare. That went easy. The domain name I transferred did not have Google Sites website attached to it. It simply forwarded to a web page I wanted. All it's settings transferred over to Cloudflare and it was a basically seamless transition. Best of all, Cloudflare allows you to create a catchall email forward.

It went so easy that I, being the wise person that I am, decided to transfer in my domain that I have linked to my Google Sites website that I use for work (like the one that my AdWords ads resolves to).

Everything transferred over to Cloudflare with ease. However, when I tried to go to my website I would get an err message. I wish I had screen shotted it, but I didn't. It was something to the effect that there were too many redirects. 

I tried so many things. So many wrong things. One of the wrong things I did was switching the Cloudflare encryption mode settings around. When I'd go to either 'Full' or 'Full (strict)' the error message I would get would be an SSL error. With "Flexible" or "Off" I would get redirect err messages.

Another wrong thing I did was I deleted the _domainconnect, A, and AAAA name records in the DNS records. DON'T do this. The A and AAAA records are IPv4 and IPv6 addresses that point to Google and somehow Google does its magic in getting your naked domain name to resolve to your Google Sites website. The _domainconnect CNAME has something to do with connecting your domain to Google services also.

I did so many other wrong things. I think I spent around 8 hours trying and failing with various settings trying to get the website properly displaying before getting it to work. 

One of my biggest errors, I think, was not waiting. It takes time for all the DNS results to propagate through the system. You don't always get instant or near instant results when you change a setting. 

In my "SHORT EXPLANATION" above I give the settings I have that I think ultimately worked. Here they are again with some pictures.

In your Cloudflare Console:

  1. Leave your encryption mode set to 'Flexible' (see edit note above why this step may not be necessary). 
  2. Turn off / uncheck: "Always Use HTTPS Redirect all requests with scheme “http” to “https”. This applies to all http requests to the zone." It's (as of this writing) under SSL/TLS in Edge Certificates.

  3. For all your A and AAAA name records that transfer in, use the Cloudflare Proxy EXCEPT with your 2 CNAME records ('www' and '_domainconnect'). I am not 100% positive you need to put in all the Google IP addresses like I did. What I do know are 2 things: 1) my site works and, 2) you need to have a Cloudflare proxy working/ running to set up a forwarding address.



  4. Create a forwarding rule that redirects your naked domain to your www address that you use for your Google Sites web page (for clarity and in the pictured example bstdealz.com is the naked domain and www.bstdealz.com is the www address).







 Sit back and relax. Give it 3-4 hours, maybe more, for all the new DNS stuff to propagate throughout the systems. It does not happen instantly. YOU HAVE TO WAIT.


A final note on why I like Cloudflare better than Squarespace:

First is price. On their free plan all you're paying is the minimum required to register your domain name. I believe I paid +/-$9.77 for 1 year of each domain name at Cloudflare, while Squarespace charged me +/-$20 per domain name per year. Cloudflare also ADDED to the time I already had on my domain name registration. It didn't just make me pay for 1 year and say 'F' you to the time I had remaining from my other registrar. 

Second is their console. Cloudflare's console just feels better than Squarespace's; it seems like I have more options/ control and was easier to navigate and find what I wanted. And, of course, there is the catchall email thing.


No comments:

Post a Comment

LRCC ITE221 Review

  ITE 221 PC Hardware and Operating Systems/ Dr. Leach Review Edited December 10, 2024. This Fall 2024, I enrolled in ITE 221 PC Hardware an...