Write Review

How to Host Your Website on Google Cloud VPS

Google Cloud Platform (GCP) has a reliable and flexible technology that you can use to run websites. The infrastructure provides the same security level offered on Google’s own websites including Google.com, Gmail, and Youtube.

Google Cloud has different options including cloud storage, virtual machines, and containers. If you are starting out on the platform, you will probably want to use Google Virtual Machines (VMs)

The paradigm used by Google VMs is similar to VPS services offered by other cloud hosting providers. In this guide, we will discuss how to host your website on Google Cloud.

Step 1: Buy a domain name

Unless you want to serve your website from a public IP address, you will need to register a domain name with your favorite registrar.  You can also use Google Domains to keep your hosting solutions under one roof.

Domain price ranges from somewhere between $10 and $15 per year. All registrars provide an for customizing the Domain Name Server (DNS) records.

Step 2: Hosting your website on Google

You can use Google Cloud storage to host a static website. However, your website will be in read-only mode and your visitors can not interact with you e.g. making comments or registering on your websites will become impossible.

If you want to run a dynamic websites Google provides virtual machines for Windows or Linux operating systems. Advanced users may use containers if their websites have a high load that needs to be distributed in a managed cluster.

Virtual Machines work pretty well for most users because they can run any kind of websites including WordPress.

Step 3: Setting up Google Compute engine

VMs on the Google Compute engine infrastructure are referred to as instances.  You can customize an instance by choosing your preferred operating system, physical storage, CPU, and RAM. This will depend on your budget.

Google has a price estimator that allows you to roughly determine how much your instance will cost per month and this serves as a good guide.

You may also use Google Cloud Launcher to deploy a full website-serving stack and install lots of software applications used in websites including; WordPress, Joomla, Django e.t.c.

If you wish to customize the Virtual Machine completely, you will have to install an operating system that supports web development. Although Windows is a good bet for those running. Net and ASP technologies, most developers opt to host their websites on Linux.

Step 4: Setting up a LAMP stack

Linux is an open source operating system built on the Linux Kernel. It can run on desktops as well as servers. To host your websites with Linux, you will need to deploy a LAMP stack. This includes; any Linux distribution (e.g. Ubuntu, CentOs, Arch Linux, Debian, Fedora e.t.c), Apache, MySQL and PHP

You can start up with Ubuntu because it is the most popular and has a lot of online tutorials. By the time of writing this guide, the most stable release was Ubuntu 18.04.

Once you choose an operating system, you have to install a web server like Apache or NGNIX. Also, most websites serve dynamic content hence they require a database. You can either choose from MySQL or MariaDB. Both are open source relational database management software and they work pretty.

Step 5: Link your domain to your hosting

You now have a domain name and a hosting solution from Google. You will have to link the two for your websites to work. In most cases, you will have to change the A record to point to your server’s public IP address. You can also use Google’s cloud DNS service to manage your domain name servers. Finally, test your websites by visiting your domain name on the browser.


Hosting your website on Google is a good step. This means your websites will run on a robust and fast network that Google has built for years. You will take advantage of Google’s distributed network service and unmatched security features. Virtual Machines provide the autonomy needed to run your websites with custom configurations depending on your needs. So, don’t stop if you are considering using Google Cloud for your hosting needs- it is an exceptional platform.


Check out the top 3 Cloud hosting services:

Was this article helpful?