Possible to have domain point to folder on origin server?


#1

I’m wanting to have, for example, www.example.com display the contents of a folder within a Google Cloud Storage bucket.

So www.example.com would bring up:
https://storage.googleapis.com/my-bucket/example/index.html

Is this possible?


#2

Yes it is @scott4, see: https://cloud.google.com/storage/docs/hosting-static-website

We’re not providing URL rewriting but as long as the host header is sent to Google bucket from Cloudflare (using the page rules) and the record for your domain is pointing to Google bucket as well (Google will provide you a CNAME), that will work like a charm.


#3

Thank you for the reply @stephane. I’ve been to that page and I just re-read it again. Did I miss the part where it describes how to have a domain point to a folder in a bucket?

More clearly, I want my domain name to point to a folder within a bucket, not to the root of the bucket.


#4

As I said, we’re not providing any URL rewriting so i’m afraid you won’t be able to do so…