Hello, dear friends! I have some troubles that I can not resolve by myself. I have a Storage bucket operated by my CMS. Path example looks like this:
https://upload-5555555.commondatastorage.googleapis.com/iblock/26.webp
Now I would like to serve this content via my subdomain: cdn.mydomain.com
I go to DNS records and try this:
Then I have "no such bucket error". I understand, that bucket`s name should be cdn.mydomain.com, but is it possible to use my current name?
I also tried this:
But nothing worked for me. Could you please tell me where I am doing it wrong? Domain is verified in Google console and is served by cloudflare.
Solved! Go to Solution.
Hi,
Your bucket name needs to be the same as your URL/domain name.
So your domain is: mydomain.com and you want to serve cdn.mydomain.com off of a GCS bucket correct? Then you need to do the following:
1. make GCS bucket called: cdn.mydomain.com
2. add CNAME record: cdn --> c.storage.googleapis.com
3. put your web files in your bucket, you may have to click the 3 dots (...) on the right side and "Edit website configuration" to tell it what file they should be looking for (i.e. index.html)
Following the same pattern, if you wanted another subdomain called support.mydomain.com, then you create a support.mydomain.com GCS bucket, and CNAME support --> c.storage.googleapis.com
Does that answer your question?
Hi,
Your bucket name needs to be the same as your URL/domain name.
So your domain is: mydomain.com and you want to serve cdn.mydomain.com off of a GCS bucket correct? Then you need to do the following:
1. make GCS bucket called: cdn.mydomain.com
2. add CNAME record: cdn --> c.storage.googleapis.com
3. put your web files in your bucket, you may have to click the 3 dots (...) on the right side and "Edit website configuration" to tell it what file they should be looking for (i.e. index.html)
Following the same pattern, if you wanted another subdomain called support.mydomain.com, then you create a support.mydomain.com GCS bucket, and CNAME support --> c.storage.googleapis.com
Does that answer your question?
Thank you for your reply. I did exactly as you said. Created a bucket with same name and then all worked. It is sad, that I can not adjust a domain name to randomly named bucket.
What about SSL cert?
User | Count |
---|---|
8 | |
2 | |
1 | |
1 | |
1 |