0
votes

I have a static website hosted on a Google Cloud Storage Bucket. I also have moved the DNS to Google Cloud DNS. So everything is in control on the Google Cloud Platform.

I only have some problems left:

  • How to solve www / non-www requests? I pointed the non-www now to a server outside the google cloud platform which redirects to www. I don't see another possibility to refer both directly to the same bucket.
  • How to solve http / https? SSL is not possible yet on buckets. The https version can be reached ofcourse, but I get a warning and the googlebot has problems with it too. For some reason they indexed some https versions of some pages while I have set canonical links to the https version. And I don't see any possibilities to set up redirects correctly.
1
What do you mean by www/non-www? Do you want to allow "foo.com" and "www.foo.com" to both resolve to the same GCS bucket? - Brandon Yarbrough
Hi Brandon, Yes. Basically I want all versions (https-foo.com, https-www.foo.com, http-foo.com and http-www.foo.com) pointing to the bucket www.foo.com. To prevent crawling/indexing issues and for direct users inserting the url in the browser. - Peter Driessen

1 Answers

0
votes

Unfortunately, that is not possible at this time. When using CNAME redirects to GCS, a bucket must exactly match the specified domain. You may not map several domain names to one bucket or vice versa.

Furthermore, "domain.com" with no subdomain is, unfortunately, right out, as DNS CNAMEs cannot be set on root domains.