GCP instance DNS configuration steps

In the last post, we configured our WP_Docker setup on GCP. Now In this section, we will cover the DNS configuration on GCP.

</figure>

First, go to GCP side menu bar > Network Services > Cloud DNS. After visiting that we can see the screen shown below.

</figure>

Now click on Create Zone and another form will appear like shown below.

</figure>

In this form, we need to fill zone name which can be anything, then DNS name, which will be your domain name and then we are good to go. Click on create.

</figure>

As we can see It will generate Nameserver records. These nameserver records are used in your domain registrars nameserver records.

</figure>

Now, we need to create two more records to point our DNS to the server. As you can see in the image after clicking add new record button we can see this page. Fill up the required details DNS name will be your domain name, First, we are generating an entry for A type record so set Resource record type to A and add your Instance IP ( As we have generated in the last post ) in server IP box and click Create. The second record will be CNAME record, so set Resource record type as CNAME and add your domain name with canonical URL www.domain.com in the canonical name section and click create. Now these two A and CNAME records are needs to be added on your domain registrars DNS records as well. After doing that we have completed our DNS configuration and now you can check that your domain will point to your server.

Written on September 2, 2018