In the middle of the year, I wanted to buy my own web domain to use as a blog of sorts, to document down some of my learnings.
However, I ran into an issue with Google Domains for this website, as Google does not support the ".sg" top level domain.
Instead, I had bought this domain during the 2019 Black Friday sale from Cybersite.com.sg, for just $66.23 total valid for two years.
Set up your site Google Site.
Make your site public.
Apply the domain mapping as instructed by Google’s documentation (mapping “www” to the site):
Log into your Cloudflare account.
Add your domain to Cloudflare and wait for the TTL to cutover (name servers, DNS, etc).
Under DNS, add “www” as a CNAME and connect it to the appropriate entry (at this moment, it is “ghs.googlehosted.com” but could change in the future).
Add an A record for your domain name "@" (selecting your IP address as 8.8.8.8 or 1.1.1.1, doesn't really matter) – although, you could just leave the IP address that was imported when you started your Cloudflare account/domain configuration. I suggest changing it to public DNS IP addresses so that you are not leaving an old IP in the record. Just my personal preference.
After the entries are added, make sure the Cloudflare “orange cloud” is active on both entries. This enforces the traffic to be routed through Cloudflare.
Go to Page Rules.
Add a page rule to redirect your root (TLD) to “www”.
Under the SSL/TLS tab of your domain, set your SSL to Full. Flexible SSL may cause redirect loops as Google Sites redirects all traffic to HTTPS.
Done.
Page Rules
With one of the three free rules as the default, you can create one in order to redirect all root domains
example.com/*
Forwarding URL. 301 Redirect.
https://www.example.com/$1
In the middle of the year, I wanted to buy my own web domain to use as a blog of sorts, to document down some of my learnings.
However, I ran into an issue with Google Domains for this website, as Google does not support the ".sg" top level domain.
Instead, I had bought this domain during the 2019 Black Friday sale from Cybersite.com.sg, for just S$66.23 total valid for two years.
Rather than wait for the next one to arrive, you could just do it now for S$12~ more and keep the momentum going from the New Year Resolution high.
Rather than wait for the next sale to arrive in order to save just S$12, you could just do it now for less by purchasing a standard ".com" domain.
Set up your website with Google Sites. (While I have a design background, this is not a website design guide.)
Make your site public.
Apply the domain mapping as instructed by Google’s documentation (mapping “www” to the site):
Log into your Cloudflare account.
Add your domain to Cloudflare and wait for the TTL to cutover (name servers, DNS, etc).
Under DNS, add “www” as a CNAME and connect it to the appropriate entry (at this moment, it is “ghs.googlehosted.com” but could change in the future).
Add an A record for your domain name "@" (http://wwwizer.com/ to get the free IP and copy from the top of page, if you don't have any webhost or preexisting IP) – although, you could just leave the IP address(if you had one) that was imported when you started your Cloudflare account/domain configuration.
After the entries are added, make sure the Cloudflare “orange cloud” is active on both entries. This enforces the traffic to be routed through Cloudflare.
Go to Page Rules.
Add a page rule to redirect your root (TLD) to “www”.
Under the SSL/TLS tab of your domain, set your SSL to Full. Flexible SSL may cause redirect loops as Google Sites redirects all traffic to HTTPS.
Done.
Page Rules
This is the key factor as without page rules being created, you would face issues accessing your domains. (Typing domain.com instead of www.domain.com leads to error)
With one of the three free rules as the default, you can create one in order to redirect all root domains.
example.com/*
Forwarding URL. 301 Redirect.