Google domains’ DNS doesn’t support ALIAS/ANAME record to apex domain (also naked domain), but it supports domain forwarding to a subdomain from an apex domain.
Let’s set this up.
In this example, we use the following records as a sample:
-
Domain:
example.com
-
Subdomain:
www.example.com
-
Shifter URL:
abc123.on.getshifter.io
-
CDN Raw Hostname:
def456.cloudfront.net
Setting up
1. Log in to the Google Domains Control Panel
2. Navigate to [My domains]
3. Click the [Manage] button on your domain
![](/wp-content/uploads/2024/03/128794013-04eb744a04050f0a9b76f635.png)
4. Navigate to [Website] menu
5. Click [Set up forwarding]
![](/wp-content/uploads/2024/03/412532865-e6aad2bb1d720213597ebb10.png)
6. Set up like below:
a) Input the naked domain name to the “Forward from” field
e.g. example.com
b) Input the URL of the www-prefixed domain name.
e.g. https://www.example.com
c) Click the [Forward] button to save changes
![](/wp-content/uploads/2024/03/412533424-88d8286236a0ead5cd606e9e.png)
7. Domain forwarding has been added.
![](/wp-content/uploads/2024/03/412535254-ffe7f7e72cd080c4493ce158.png)
That’s all.
Let’s access your naked domain with your web browser and check that the domain is forwarding correctly.
Here is a sample command with a URL and its result:
curl --head http://example.com
HTTP/1.1 301 Moved Permanently
Location: http://www.example.com
Date: Wed, 19 Jun 2019 09:51:10 GMT
Content-Type: text/html; charset=UTF-8
Server: ghs
Content-Length: 217
X-XSS-Protection: 0
X-Frame-Options: SAMEORIGIN