Reputation: 29
I am admittedly very much a novice at this web stuff - gimme custom USB drivers and I'm good all day...
Deployed a WordPress site on a Google Cloud Virtual Machine. Setup a couple of pages and the site works fine going to the numeric IP. Followed instructions on https://www.youtube.com/watch?v=eXtqqofrhOo - static IP, DNS zone, add records for domain_name and www.domain_name, etc.
Seems straight forward and simple enough. But, after a day, the "servers IP address could not be found". Went back through and double checked settings and spellings. All looks fine.
Found one problem. The 'dig' tool tells me my domain is listed on ns-cloud-e#.googledomains.com - the 'E' set of cloud DNS servers(?). Maybe that was from an earlier attempt. But now my DNS zone says my domain is listed with ns-cloud-a#.googledomains.com - the 'A' set of cloud DNS servers. I know I need to wait for propagation but shouldn't I at least be seeing the A DNS servers in the 'dig' tool?
Not sure where to go from here. Any suggestions would be -greatly- appreciated. TIA!
Upvotes: 2
Views: 239
Reputation: 4461
To connect you domain to your website on GCP you should follow next steps:
ns-cloud-d1-googledomains.com
, ns-cloud-d2-googledomains.com
, ns-cloud-d3-googledomains.com
and ns-cloud-d4-googledomains.com
) at domain registrar sidenmap -Pn EXTERNAL_IP_OF_YOUR_VM
and configure firewall if necessaryTo check if your configuration at registrar side correct use command dig NS DOMAIN_NAME
and you should get something like this:
$ dig NS DOMAIN_NAME
...
;; ANSWER SECTION:
DOMAIN_NAME. 86400 IN NS ns-cloud-d1-googledomains.com.
DOMAIN_NAME. 86400 IN NS ns-cloud-d2-googledomains.com.
DOMAIN_NAME. 86400 IN NS ns-cloud-d3-googledomains.com.
DOMAIN_NAME. 86400 IN NS ns-cloud-d4-googledomains.com.
After that you can check A records with quite the same command:
$ dig A DOMAIN_NAME
...
;; ANSWER SECTION:
DOMAIN_NAME. 300 IN A 104.XXX.225.XXX
$ dig A DOMAIN_NAME
...
;; ANSWER SECTION:
www.DOMAIN_NAME. 300 IN A 104.XXX.225.XXX
if everything looks good at DNS side, but your site doesn't work:
This site can’t be reached
DOMAIN_NAME refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
check current status of firewall:
$ nmap -Pn 104.XXX.225.XXX
...
PORT STATE SERVICE
22/tcp open ssh
80/tcp closed http
443/tcp closed https
3389/tcp closed ms-wbt-server
Nmap done: 1 IP address (1 host up) scanned in 11.49 seconds
in case ports 80 and 443 are closed you should open ports on firewall - go to Compute Engine
-> VM instances
-> click on NAME_OF_YOUR_VM
-> click EDIT
-> go to Firewall
section and check Allow HTTP traffic
and Allow HTTP traffic
-> click Save
. After that, check again with command nmap -Pn 104.XXX.225.XXX
if ports 80/443 (http/https) are open:
$ nmap -Pn 104.XXX.225.XXX
...
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
443/tcp open https
3389/tcp closed ms-wbt-server
Nmap done: 1 IP address (1 host up) scanned in 11.49 seconds
Returning back to your issue:
The 'dig' tool tells me my domain is listed on ns-cloud-e#.googledomains.com - the 'E' set of cloud DNS servers(?). Maybe that was from an earlier attempt. But now my DNS zone says my domain is listed with ns-cloud-a#.googledomains.com - the 'A' set of cloud DNS servers.
To solve this issue go to your zone on Google Cloud DNS and check NS records:
In case they aren't the same go to domain registrar side and replace NS records with proper ones then wait and check again. Keep in mind that propagation of DNS changes could take 24-72 hours.
Upvotes: 0