Google Sites and naked domains

If your domain registrar doesn't support fowarding non-www to www, then you need to use a 3rd party service. Here's how to set up Cloudfare to route non-www traffic to your www website

Google Sites and naked domains

Look at your browser address bar.

You'll see this website is hosted at https://www.googlesites.dev. That full website address is called the fully qualified domain name (FQDN). If you type https://googlesites.dev into your browser, you'll still land at https://www.googlesites.dev. This is called forwarding. The non-www version of the website address is called the naked domain

Good practice with Google Sites is to host the website under the fully qualified version of the website address, and forward the naked version of the domain to the fully qualified one. I use Porkbun and Squarespace for domains and both providers support redirect, or forwarding, functionality.

Some registrars don't support this, for example Hostinger. In the Hostinger domain control panel, there's no way to make sure that non-www traffic is forwarded to the www version, so you'll need to use a 3rd party service to do this. In this case, I'll describe how to do forwarding with Cloudflare. Equally, you could use NakedSSL.

A basic summary of what you need to do

To forward non-www traffic to the www version of your website, we need to do the following:

*This is based on personal experience, so I'll take no responsibility if this doesn't work for you.

Step 1: Create an account with Cloudflare

Let's get setup on Cloudflare:

1. Click on Add site and enter your domain name to add it to Cloudflare

Step 2: Enter your DNS

Enter your domain into the 'Connected domains' box, and click 'Add'.

You may have to follow some steps to verify your domain. If you are, follow step 4 in Porkbun's instructions.

  1. Add the DNS record in your Cloudflare's DNS dashboard
2. Add your DNS record to connect your domain to the custom domain record
3. Change the default nameservers

Step 3: Create the redirect rule

Now go to the page rules section in your Cloudflare and click on create page rules. Create teh redirect rule by following the instructions below:

  1. Page rules
5. Save and deploy the rule

Has this guide helped you?

Help me improve this page! Were the steps clear, did I miss something? Please let me know.