We wanted a subdomain http://magento.ngstorefront.com to point to a VM on Google Cloud. We could not find clear docs on this.
What we did:
- Deployed a Magento Google Click to Deploy VM from marketplace
- Assigned a Static ip address to the VM –> 35.193.85.53
-
The default Magento site loads at http://35.193.85.53
-
To have the sub-domain http://magento.ngstorefront.com load the site (loading at http://35.193.85.53). So we added a new A record for “magento.ngstorefront.com –> 35.193.85.53” in Google Cloud DNS
-
On the domain registrar (Google Domains), we added a Registered host (magento.ngstorefront.com) and a Custom Record as below.
But the site doesn’t load at http://magento.ngstorefront.com What are we missing?
2
Answers
The subdomain is resolving now. Wanted to add the answer.
The mistake we did was to create the subdomain A record in Registrar (Google Domains). Although registered in GoogleDomains, our primary domain ngstorefront.com is pointing to Siteground
So we have to add the A record in Siteground instead of GoogleDomains , like this
Updated on 3/15/2019
While the above solved the issue of IP address pointing and loading Magento, but we had one issue where the URL would change to IP instead of staying as http://magento.ngstorefront.com
To solve the above, do this: Login to Magento Admin > Stores > Configuration > General > Web > Base URLs
And enter the domain name you want Magento to use.
Based upon the answer provided, I’d say that the problem is, still having set
siteground.us
asNS
.You’d have to change the
NS
records to Cloud DNS name-servers at Google Domains, then it would resolve through Cloud DNS and the zone-file can be maintained there (as you’ve tried without effect).