How To Connect A Domain Name To A WordPress Installation In Google Cloud Platform

Do you want to connect a domain name to your Google Cloud Platform’s WordPress installation? If you do, this tutorial will walk you through the step by step process.

To proceed with the tutorial, you must have a domain name registered and also you must have WordPress deployed in Google Cloud Platform. It doesn’t work without one or the other.

Step 1: Enable Google Cloud DNS API

To enable it, head over to the APIs & Services dashboard in your Google Cloud Platform account.

Followed by clicking on the + Enable APIS AND SERVICES button.

Doing so will bring you to the API Library.

Here, search dns. And the Google Cloud DNS API will appear.

Click on it.

On the following screen, click on the Enable button.

And just like that, the Google Cloud DNS API is enabled.

Step 2: Create a DNS zone

To create a DNS zone, head over to Network Services > Cloud DNS.

After that, click on the Create zone button.

And followed by adding the the zone details like this:

Here’s the explanation of the zone details above:

  • Zone type – Private means that the domain name is not available for everyone to access on the internet, only you can access it. Public means the domain name is available for everyone to access on the internet. In other words, you have to set it to Public
  • Zone name – This is just a reference for the zone that you are creating. It can be anything. I set to spicysos because the domain name which I’m about to connect is
  • DNS name – This is where the domain name goes

And the rest can be left as it is. They are not required to be adjusted.

Click on the Create button to create the DNS zone once the above is completed.

Step 3: Add A record

After the DNS zone has been created, you will be brought to a screen where you will be presented with the zone details.

Here, click on the Add record set button to add a new A record.

And add the site address of your WordPress installation in the field that says IPv4 address.

Followed by clicking on the Create button.

Step 4: Add a CNAME record

To add a CNAME record, click on the Add Record Set button again.

And followed by adding the details like the following screenshot:

As you can see above, you will need to add www under the DNS name field, select the CNAME option from the Resource record type field and input the domain name under the Canonical name field.

Click the Create button to proceed.

Step 5: Add the nameservers

This is the final step of this tutorial. Adding the nameservers is where the connection between your WordPress installation in Google Cloud Platform and your domain name takes place.

For this, you will need to copy the nameservers provided under the Zone details area in Google Cloud Platform and add it to the nameservers area in your domain name registrars account.

Here’s an example:

Note: If you can’t find the nameservers area, seek for support from your domain name registrar.

That’s all is needed to be done.

The domain name is now being connected to the WordPress installation in Google Cloud Platform. It may take up to 48 hours for the connection to be secured.

But in my case, the connection took place in an hour’s time.

What’s next? Edit WordPress URLs.