I have a GCP static website set up with Cloudflare to use my www subdomain modeled after www.example.com. Because I want the root url e.g. example.com also to land on the same place, I added a page rule that should redirect from the equivalent of example.com to www.example.com but it doesn’t work. I tried various versions such as:
with “example” replaced with my domain name. But the url would always give me a DNS_PROBE_FINISHED_NXDOMAIN error. In the end I created a second GCP storage bucket that points at my naked domain and added a 404.page on this site that has a client side redirect that points to the www url. But using a client side redirect is less efficient than a server redirect. Why doesn’t the page rule work? How can I debug this?
Nope, I still think the HTTPS doesn’t work on GCS even nowadays as far as:
… Since Cloud Storage doesn’t support custom domains with HTTPS on its own, this tutorial uses …
… You can also use Cloud Storage to serve custom domain content over HTTP, which doesn’t require a load balancer. …
Issue : I want to serve my content over HTTPS without using a load balancer.
Solution : You can serve static content through HTTPS using direct URIs such as https://storage.googleapis.com/my-bucket/my-object . For other options to serve your content through a custom domain over SSL, you can:
Serve your static website content from Firebase Hosting instead of Cloud Storage.
If correct, those solutions don’t support HTTPS by default. Google Cloud Platform does offer a guide for setting up a site with GCS with an HTTPS load balancer in front of it, but the load balancer costs a bit per month.
or I am still using the old resource of information since when I used it? - could be I am wrong about it nowadays …
Meaning, the Flexible SSL is the only way to work - which we really do not want to use as it will be un-encrypted way:
Or it actually could work by using Full SSL option (not the Strict one) - as it fails back to HTTP (not HTTPS)?
I should again try that out first to have the correct information for further cases
Last but not least, we should always aim to the correct SSL settings (Full (Strict) SSL)as written on the below article:
So with that in place, should the page rule redirect now work? If this worked then the second bucket is never actually visited even though I needed it in order to get this entry to work. What do you mean by @fritex’s clear example btw? What does the word “static” do in the subdomain? What is wrong the CNAME entries I put?