September 23, 2019

Pointing your Domain Name to WordPress on Google Cloud (Click to Deploy)

Pointing your Domain Name to WordPress on Google Cloud Configuring a Domain for WordPress on Google Cloud Platform (Click to Deploy)

A domain name is like a street address that directs people to your website’s location. This tutorial will show you the easiest way is to point your domain name to your (Click to Deploy) version of the WordPress site on GCP.

Prerequisite: Before starting this tutorial, you should’ve already purchased a domain name and have set up WordPress on Google Cloud.

1. Create a DNS zone

Log in to the Google Cloud Platform dashboard and Head over to Network Services -> Cloud DNS.

Pointing your Domain Name to WordPress on Google Cloud - Cloud Dns

In the resulting screen, Click on Create Zone.

Pointing your Domain Name to WordPress on Google Cloud - Create Zone

Add the name of your website in the Zone Name field, and your domain name in the DNS Name field. Click the Create button.

Pointing your Domain Name to WordPress on Google Cloud -Zone Name

Locate your IPv4 address by navigating to Compute Engine -> VM Instances and Make note of External IP as you need it in the next step.

Pointing your Domain Name to WordPress on Google Cloud - Copy IPv4 address

2. Add DNS Records

After creating your zone, click on the Add Record Set. Then create an “A” record.

  • In the Resource Record Type field, select “A”.
  • In the IPv4 Address field, enter your IPv4 address.

Pointing-your-Domain-Name-to-WordPress-on-Google-Cloud -Add a record

Next, create a CNAME record.

  • In the DNS Name field enter www.
  • In the Resource Record Type select CNAME.
  • Enter your domain name in Canonical name field.

Pointing your Domain Name to WordPress on Google Cloud - Add Cname

Make note of four NS records as you need them in the next step.

Pointing your Domain Name to WordPress on Google Cloud

3. Add an NS record

Add the NS records in Control panel of Domain Provider. In this example, Godaddy is used as the domain name provider, however, the process will be similar for all domain name providers.

  1. Log into your GoDaddy Account Manager.
  2. Locate the domain, then select Manage DNS
  3. In the Nameserver settings select Custom, then click the Edit Name Servers link.
  4. Add the data you got in step 2 and click save to finalize the changes.

Pointing your Domain Name to WordPress on Google Cloud

4. Edit WordPress URLs

Enter the preferred URL for your website in the URL fields. This can either be at www.yourdomain.com or at yourdomain.com. The important thing is to select and stick to a preferred version.

To change your preferred WordPress URLs, navigate from your WordPress dashboard to Settings -> General.

Pointing your Domain Name to WordPress on Google Cloud (Click to Deploy)

Lastly, make sure that you check the permalink structure of your website. After changing your domain name settings, this setting often gets corrupted. By going to Settings -> Permalinks, you can access your permalink settings.

Pointing your Domain Name to WordPress on Google Cloud (Click to Deploy)

That’s it! Your domain name is now pointing to your WordPress Site on Google Cloud!

If you have any questions about installing WordPress in Google Cloud? Ask away in the comments section below.

Naffys Mir

I'm Naffys Mir, Programming Geek and Founder of CodersStuff.com. Coders Stuff is a Blog Packed with Loads of High-quality Programming Tutorials and a Ton of Engaging Advice and Insight into Front and Back End Technologies.

View all posts

Add comment

Your email address will not be published. Required fields are marked *