Things To Knows Before Hosting Static Website On Google Cloud Storage
July 26, 2017Pros and cons
No SSL support for custom domain
Though you can serve your content through direct URI like https://storage.googleapis.com/my-bucket/my-object
, Google Cloud Storage only
support HTTP (due to CNAME redirect). To serve your content through custom domian using SSL, you could explore the following options.
-
Use Google Load Balancer (minimum of $0.025 per hour, $18 a month; $0.008 per GB of data processed)
-
Use 3rd Party Content Delivery Network (CDN)
-
CloudFlare (you need to change your domain name servers to Cloudflare)
-
Use Fire Base Hosting (Free plan available with 5GB storage)
References:
- [Hosting a Static Website] (https://cloud.google.com/storage/docs/hosting-static-website)
- Static Website Examples, Troubleshooting and Tips
Pricing
Storage Class | Description | Price (per FB per month) |
---|---|---|
Multi-Regional Storage | - Frequently access “hot” content - Geo-redundant | $0.026 |
Regional Storage | - Cheaper version of Multi-Regional Storage | $0.02 |
Nearline Storage | - Access once per month | $0.01 |
Coldline Storage | - Access once per year | $0.007 |
Pricing may varies according to region.
Also, it’s also worth pondering if using cheaper storage like Nearline is feasible if pair with CDN like Cloudflare.
References:
- [Storage Classes] (https://cloud.google.com/storage/docs/storage-classes)
- Google Cloud Storage Pricing
How to host static website on Google Cloud Storage
Refer to Hosting a Static Website
Alternatives for static website hosting
- Amazon S3 with CloudFront (CDN)
- Firebase hosting
- Setup your own server on AWS, Digital Ocean or Linode
- Github Pages
- Google App Engine
- surge.sh, netlify, etc.
- algolia
- analytics
- android
- android-ktx
- android-permission
- android-studio
- apps-script
- bash
- bootstrap
- bootstrapvue
- chartjs
- chrome
- cloud-functions
- coding-interview
- coroutines
- crashlytics
- css
- dagger2
- datastore
- datetime
- docker
- eslint
- firebase
- firebase-auth
- firebase-hosting
- firestore
- firestore-security-rules
- flask
- fontawesome
- fresco
- git
- github
- glide
- google-app-engine
- google-cloud-storage
- google-colab
- google-drive
- google-maps
- google-places
- google-play
- google-sheets
- gradle
- html
- hugo
- inkscape
- java
- java-time
- javascript
- jetson-nano
- kotlin
- layout
- lets-encrypt
- lifecycle
- linux
- logging
- lubuntu
- markdown
- mate
- material-design
- matplotlib
- md5
- mongodb
- moshi
- mplfinance
- mysql
- navigation
- nginx
- nodejs
- npm
- nuxtjs
- nvm
- payment
- pip
- pwa
- pyenv
- python
- recylerview
- regex
- room
- rxjava
- scoped-storage
- selenium
- social-media
- ssh
- ssl
- static-site-generator
- static-website-hosting
- sublime-text
- ubuntu
- unit-test
- uwsgi
- viewmodel
- viewpager2
- virtualbox
- vue-cli
- vue-router
- vuejs
- vuelidate
- vuepress
- web-development
- web-hosting
- webpack
- windows
- workmanager
- wsl
- yarn