How to host a static website for free using Google Cloud Platform

 


What is Google Cloud Platform ?

Google Cloud Platform is a data center infrastructure that Google uses for their products like Youtube, Search, etc. GCP is one of the popular cloud services especially for startups and websites since its price is cheaper and affordable than other cloud computing providers. Other popular cloud service providers are Amazon Web Services, Microsoft Azure, Oracle and IBM Cloud.

Google provides 300$ credit for free to new users. We can use this to host a new html site for free.

Steps for hosting a website in Google Cloud Platform :

  1. Signup for free quota from Google cloud website https://cloud.google.com/ using your google account and validate credit card details.

Signup

  1. Then Create a project by giving your needed website name.

  2. Create an app in App Engine https://console.cloud.google.com/appengine to your project
    Create an App

  3. To Deploy your website to the created app, download Google Cloud SDK from the link https://cloud.google.com/sdk/docs/quickstarts .

  4. Run Google Cloud SDK

  5. Initialize the Google cloud SDK with gcloud init command.
    Gcloud Init
    Next Step

  6. Create a website design for your startup in path_to_website_root_folder

  7. Point command prompt to the folder the website files exists
    cd ../../path_to_website_root_folder/

  8. Create app.yaml file and map website files in the website root folder. Follow the standards and code snippets in the link https://cloud.google.com/appengine/docs/standard/php/config/appref

  9. Deploy the app using command gcloud app deploy
    https://cloud.google.com/appengine/docs/standard/php/tools/uploadinganapp

  10. The files will be uploaded successfully and a subdomain will be generated on appspot domain. You can use that subdomain or connect your own domain to the project. https://console.cloud.google.com/appengine/settings/domains.

Previous Post Next Post

Insurance News