How To Point DNS To Google Cloud Platform Instance

How to point DNS to Google Cloud compute engine

In this tutorial we are going to point our custom domain to Google Cloud compute engine. Using this domain you can access your server using a custom domain name instead of using IP address. 


What is DNS?

DNS stands for Domain Name System. DNS is a naming service for computers which are connected to internet or private network. This domain name is assigned to the Public IP of the system to access it via domain name.

1. Getting your domain name.

To point a domin to google cloud first you need to have a domin name. To get domain name you can buy or get some free domain online.

In this tutorial i am using a free domain name called shortclicks.ga i got this free domain in freenom.com 

2. Setting up Cloud DNS

Step 1 : Login to your Google Cloud Platform on https://console.cloud.google.com 
Step 2 : Head over to Network Services > Cloud DNS
Step 3 : Click Create Zone Button.



Step 4 : Enter Zone name, DNS name and click Create option.

you can see after creating the DNS zone

Step 5 : Click Add record button and follow below steps.

           a.  leave DNS name as it is.
           b. Set Resource Record Type = A , TTL = 5 and TTL unit = minutes.
           c. In IPv4 Address type your Instance External IP.
           d. Click Create.

Step 6 : Create another record and follow below steps.

           a.  In DNS name type www
           b. Set Resource Record Type = CNAME , TTL = 5 and TTL unit = minutes.
           c. In canonical name type your domain name.
           d. Click Create.

Now we successfully setup our Cloud DNS name



3. Changing NameServer

Step 1 : Login to your Domain Name service
Step 2 : Click your domin name and the click change name server.
Step 3 : Type the below name server in one by one.
ns-cloud-a1.googledomains.com.
ns-cloud-a2.googledomains.com.
ns-cloud-a3.googledomains.com.
ns-cloud-a4.googledomains.com. 
Step 4 : Click Change Name server and wait 5 - 10 minutes.

Now type your domin name in web browser and you can see your domain name is successfully pointed to Google Cloud.

Post a Comment

0 Comments