Set default ACL for Google Storage bucket
1 min readNov 3, 2018
If you want to host a static website on your google bucket
- Create a bucket with your sub domain name (e.g. cdn.mydomain.com)
2. Set ACL to public-read for new objects before uploading any data into the bucket. You can use the following command in Google Cloud shell.
$ gsutil defacl set public-read gs://bucketname
3. Create a CNAME record on your DNS server. See https://cloud.google.com/storage/docs/hosting-static-website for details.
Tip: You can use cloudflare to access your google storage bucket static hosting with HTTPS and free caching.