So, you have created your WordPress site on Google Cloud, it’s time to add domain to your Google Cloud account.

If you haven’t, check out my post on how to create your WordPress site on Google Cloud for free.

So you’re excited about your new blog and you can’t wait to share it to the world.

But your blog address is horrible and you don’t want to drive people away.

In this post, I’ll show you how to register a  domain name and add it to your Google Cloud account.

When we are done, you can access your site by going to http://www.yourdomain.com

Let’s get started!

Step 1: Register a Domain Name

Before you can register a domain name, you need to know what domain name you want to get for your blog.

Keeping your blog’s name simple and memorable is important.

Getting the right domain name for your blog will take time. Not only you need to check if the domain is available, but you need to check if the social media username is available as well.

Most mistake people made is they registered a domain for their blog, work on their blog and when they wanted to set up their twitter account or Facebook pages, they realised the username is taken.

You can use tool such as Namechk to check for domain name and social media username availability.

Once you have found a suitable name, you’re ready to register a domain.

I bought my first domain with GoDaddy, but now I always use Namecheap to get any new domain.

I find Namecheap website to be less clustered and they do less upsell compared to GoDaddy. I find it easier to complete the whole checkout process without getting distracted.

If you try to buy a domain with GoDaddy, you’ll notice that they will upsell tons of things during the checkout process hence making the whole experience very confusing and annoying at times.

Bonus: Namecheap posts fresh coupon codes every month on their site and you can use it to register domain or purchase other products they are offering.

Click here to register a domain on GoDaddy.

Click here to register a domain on Namecheap. Get free WhoisGuard for 1 year.

Disclosure: this is an affiliate link. If you choose to buy through my link I will get a small commission at no extra cost to you. Thank you so much for the support.

Step 2: Set up Google Cloud DNS

On your Google Cloud Account, you will need to setup the “Cloud DNS” so that it can be used to link your domain.

But before that:

We need to configure a Static IP address for your WordPress site.

You might be wondering why? Didn’t Google Cloud set up your IP address automatically when you deployed your site?

That’s right.

But what would happen now is that if you start and stop your VM instance which is your “server”, Google Cloud will automatically assign a new IP to your server and when that happen, it will screw up your DNS configuration.

So to prevent that from happening, we need to reserve a static IP address and assign your VM to use that.

Let’s get to it.

From your Google Cloud dashboard, scroll down to “VPC network” and click “External IP addresses”.

Google Cloud External IP addresses - TypeEighty

You should be able to see an IP address there of type Ephemeral. Click on the “RESERVE STATIC ADDRESS” button.

Google Cloud External IP addresses - TypeEighty

You have to fill in the details for the static IP address.

Google Cloud IP address config - TypeEighty

Name: You can use any name make it as descriptive as possible.
IP version: You can leave it to IPv4
Type: You can leave it as Regional as you won’t need to set up any load-balancing at this stage
Region: Choose the same Region as the VM you created.
Attached to: You need to select the VM instances where you deployed your WordPress site.

Click “Reserve”.

Sit tight and wait for the process to finish.

You should see the new Static IP address created and used by the VM instance you created previously.

Google Cloud External IP addresses - TypeEighty

It’s time to set up the Cloud DNS. Scroll down to “Network services” on the sidebar and click “Cloud DNS”.

Google Cloud DNS - TypeEighty

We are going to create a new zone name for your domain. Click on “CREATE ZONE”.

Google Cloud DNS - TypeEighty

Simply type in your domain name as the DNS name and click “Create” button.

Google Cloud DNS new zone - TypeEighty

Google Cloud will create nameservers that you can use for your domain.

Your zone details will look something like this.

Google Cloud DNS Zone Details - TypeEighty

Next, we will add all the required record set to the zone.

1. We add an “A” record set. “A” record is used to specify the static IP address we created earlier. Basically this is will point your domain to your server.

DNS Name: Leave it as it is.
IPv4 Address: Enter the static IP address that you created earlier.

Google Cloud DNS record set - TypeEighty

2. We add a “CNAME” record. This will allow people to access your website with or without www.

DNS Name: Enter ‘www’.
Canonical Name: Enter your domain name.

Once set up, you can access your website  by going to http://www.yourdomain.com or http://yourdomain.com

Google Cloud DNS record set - TypeEighty

Finally, your zone details should look like this.

Google Cloud DNS zone details - TypeEighty

We’re all set with Google Cloud DNS.

Sign up for the Free TypeEighty Newsletter

Never miss out on new tutorials, products or reviews. No spam, I promise.

Step 3: Update Domain Nameservers (DNS)

Now that we have configured the Cloud DNS on your Google Cloud account, we need to update your domain nameservers.

Login to your domain registrar account where you registered your domain.

If you registered your domain with Namecheap, click “Domain List” on the sidebar.

Namecheap Domain List - TypeEighty

You’ll see your domain name with its expiration date. You can turn on the auto-renew if you want Namecheap to renew the domain automatically.

Click “Manage”.

If you are using GoDaddy or other registrar, login to your account and select your domain.

Scroll down to “Nameservers” and Select “Custom Domains” from the dropdown.

Namecheap nameservers - TypeEighty

Voila, you’re done.

Final Thoughts

Congratulation!

You have registered a domain for your website and added your domain to your Google Cloud account.

At this point, you can type in your domain and you will be able to see your website.

If you can’t see your website, don’t panic. Stay calm.

Any changes made to your domain nameservers (DNS) might not reflect immediately. It could take up to 24 hours, so just take a short break and try again later.

Have a question? Let us know in the comments.

WordPress Google Cloud - TypeEighty


Santiwijoyo Salim

I am a Front-end developer, design lover, coffee addict, technology enthusiast. Has strong passion for productivity, new ideas and problem solving.

All author posts
Related Posts
15 Shares
Share
Tweet
Pin
+1
Share
Stumble