I created a GCS bucket www.example.com
and have setup a CNAME record with my DNS provider (DNSimple) to point at c.storage.googleapis.com
. I can now access my domain with www
but also want to make the root domain point at the bucket. Reading through threads on the same subject this seems to be possible with a synthetic record (google domains) or ALIAS record (other dns providers). I don't seem to be able to get this to work with DNSimple though so was wondering if anyone can spot my error?
I get the following error when accessing the root domain:
<Error>
<Code>NoSuchBucket</Code>
<Message>The specified bucket does not exist.</Message>
</Error>
I set my ALIAS record to point my root domain example.com
at www.example.com
but still no luck. So basically the below two records:
ALIAS example.com www.example.com
CNAME www.example.com c.storage.googleapis.com
Am I missing something or is this a limitation of DNSimple as this apparently seems to work with Google Domains (after reading through other questions)?
Just to add the bit from the Google documentation which states the same:
Note: DNS does not support creating a CNAME record on a root domain, such as example.com, so in most cases, you must create your CNAME record on a subdomain, such as www.example.com or myblog.example.com. Some DNS providers offer a non-standard feature that allows a root domain to be aliased to another name without the use of CNAME. Consult your DNS provider documentation to determine if such a feature is available.
This was simpler than I thought. Instead of adding an ALIAS record I had to add an URL record pointing example.com
at http://www.example.com
to make the redirect work.