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 to redirect non-www traffic to your www website. This article explains how
Redirecting non-www traffic to your www Google Sites website
OK. You've set up your Google Sites website and connected your custom domain. Well done!
You now want to make sure it works when you visit https://www.example.com and https://example.com. Basically you need to set a forwarding rule. This article explains how to redirect non-www traffic to the www version of your website.
Domain forwarding in Google Sites
How domain forwarding works for Google Sites
Look at your browser address bar. You'll see this website address is https://www.googlesites.dev. If you type the domain name without the www (https://googlesites.dev) you'll still see this website. That's because I've forwarded the 'naked' version of the domain to the 'fully qualified' version of the domain.
Let's break that down so you understand the terminology:
https://www.googlesites.dev is the 'fully qualified domain name' (FQDN)
https://googlesites.dev is the 'naked domain' (because there's no www).
If you type https://googlesites.dev you'll still get to https://www.googlesites.dev because I have set a forwarding rule to send traffic (visitors) to the non-www version of my domain to the www version.
Why forwarding non-www to the www version is a good thing
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 as part of the domain settings. This is a good thing to do mainly because it seems to cause less problems this way.
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. The simplest way to do this is to use a free 3rd party service like NakedSSL or redirect.pizza.
Domain registrars and forwarding support
Some domain registrars (the folks you bought your domain from) support forwarding as part of their domain services. Some don't. This article is written to help people whose registrars don't support forwarding.
I'm adding to this section as I find out more so please do let me know if there's a registrar you can tell me about that's not listed below. The more we add the more useful it is. Help me, to help you. 😀
Registrars that don't support domain forwarding
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:
Publish your Google Sites website using your custom domain
Create an account with the 3rd party service and set up the redirect
Chillax
Step 1: Publish your Google Sites website using your custom domain
This is the basic first step. You need to get your website setup and visible on Internet at www.yourdomain.com before we can do the redirect.
Follow the steps in this article on how to connect your custom domain to Google sites. Come back here when you've done that.
Step 2: Create an account with the 3rd party service and set up the redirect
There are two services I've used to redirect naked domains to fully qualified domains:
Really easy to use, and free. Basic steps are:
Create a redirect.pizza account.
Enter the source, or naked domain (e.g., example.com)
Enter the destination domain (e.g., www.example.com)
Press "Create redirect"
The required DNS change is provide, which you need to add to your DNS settings*
Wait. DNS changes may take up to 24 hours to fully propagate across the Interwebz.
*When editing the DNS settings on your control panel, you're adding a DNS record. In this case, an 'A' record. If you already have an 'A' record with an '@' symbol, edit it with the settings provided.
Easy to use, basic plans are free
Create a redirect.pizza account.
Test your URL to make sure it can be redirected
Enter the source, or naked domain (e.g., example.com)
Enter the destination domain (e.g., www.example.com)
Press "Create redirect"
The required DNS change is provide, which you need to add to your DNS settings*
Wait. DNS changes may take up to 24 hours to fully propagate across the Interwebz.
*Same as redirect.pizza, you need to add (or edit) a DNS record. In this case, an 'A' record. If you already have an 'A' record with an '@' symbol, edit it with the settings provided by Nake SSL.
Step 3: Chillax
The common rule of thumb is that it takes up to 24 hours for DNS changes to propogate across the internet. In reality I've found it's a lot quicker than that. Often you can check within an hour to see changes, and try accessing the non-www version through an incognito browser, just to make sure you're not viewing a cached version of your website.
Has this guide helped you?
Help me improve this page! Were the steps clear, did I miss something? Please let me know.