Host static web site on Google Cloud Storage

A few steps, base on https://developers.google.com/storage/docs/website-configuration

  • Register a domain name, for example, mydomain.com
  • Go to https://www.google.com/webmasters/tools/ to verity the domain ownership. Typically I create DNS TXT (Follow alternate method, then Domain name provider) to end-up adding something like that:
[blank] IN TXT "google-site-verification=MjSLfpPhbuQqEVdNjx9qlzMmtX5oZdvgShdBLn-Nhik"
  • Create a bucket with the [subdomain.]mydomain.com name (subdomains are optional)
  • push 2 simple files to it (index.html, 404.html)
  • Configure the bucket as a web site
setwebcfg -m index.html -e 404.html gs://subdomain.mydomain.com
  • In your DNS create a CNAME aliases of c.storage.googleapis.com
subdomain IN CNAME c.storage.googleapis.com

Voilà

Popular posts from this blog

Simple Samba setup on Lubuntu

Soving AccessDenied on Google Cloud Storage domain mapping

Deploying a static website efficiently on Google Cloud Storage