Redirecting multiple subdomains to a static site on Google Cloud Storage with Cloud DNS

a-recordcname-recorddomain-name-systemgoogle-cloud-platformredirect

I am trying to migrate my website from a wordpress site to a static site.

I have added all my static assets to a bucket on google cloud storage and successfully pointed static.mildfuzz.com to that bucket using a CNAME. All is good.

How can I redirect both mildfuzz.com and www.mildfuzz.com to the same bucket? My thought was to use ALIAS or URL, but they do not seem available using Google Cloud DNS service. I then thought maybe use a CNAME, but I was concerned that assigning a CNAME to mildfuzz.com would mess with my MX records.

At the moment my static site is also being served by a Compute Engine VM, so that I can use an A record pointing to an IP, but I would very much like to be able to turn this VM off, as that is the point of switching to a static site in the first place!

Best Answer

At the moment, there is no real way of routing multiple domains including a naked domain to a single bucket with the use of Cloud DNS that applies globally.

Cloud DNS does not currently offer ALIAS or URL records and the using a CNAME record will likely affect your MX records.

This seems like an excellent feature. I would suggest filing a feature request on the Google Cloud Platform public issue tracker with the Product-CloudDNS label. Feel free to comment with a link if you do so here so others can follow through and support the request.

Related Topic