I have migrated my website to the Google Cloud servers. I have pointed the old DNS to the Google DNS and I have setup the DNS zone with an A record for the main domain pointing to the IP of the Google Cloud server and a CNAME record for the www subdomain. However, when I type the domain name in the browser, it loads the Google Cloud IP, but the browser doesn't show the domain name but the IP address.
You need only one DNS entry for the instance;
www aliased (A) to the (external) IP address of the server.
From your description I guess that you configured your Cloud DNS in a correct way and that your domain registrar is pointing to GCP DNS servers:
nameServers:
- ns-cloud-a1.googledomains.com.
- ns-cloud-a2.googledomains.com.
- ns-cloud-a3.googledomains.com.
- ns-cloud-a4.googledomains.com.
Nevertheless make sure your DNS configuration looks similar to this:
If you need to add some records to your DNS here's some usefull documentation on how to add records to do it. You can use both console or gcloud utility for this.
You may also have a look at the documentation on how to migrate to GCP from other providers.
But - I suspect some tricky-webserver configuration issue here. Why ?
You pointed out that you can reach your website - but instead of domain name you see a real IP of your site in the browser. That may be the result of a specific configuration that "redirects" you to a certain IP after detecting you used domain name to get to the server.
Please inspect your webserver's configuration and try to point out a real cause of this.
Related
Hej!
I own a domain registered through GCP and it's connected with Cloud DNS in GCP, I would be very happy if you could help me setup my custom domain for my web page at buahaha.github.io.
I think I know how to do this, because I did it before with other domain(s), but this time something is not working as it should. I have set up even a TXT record, and it does not propagate through DNS servers, and the same goes for my CNAME record. I attach screenshots of my setup below.
It's strange to me as it is the basic setup for this kind of service, and I'm really confused...
Pozdrawiam,
Szymon 🎶
In addition to #blacha answer, here are some links and guidance. Once you use Cloud Domain to register a domain, there is an option where you can use which DNS provider that you use for your domain. These are Cloud DNS, Google Domains and Custom Name servers.
If by chance you get confused which DNS server that you are using I suggest to DIG your domain to see which name server that you are using just to make sure you are using the correct DNS server.
Since this concern choses Cloud DNS here is the link that you can follow on how to create zone, configure A record connecting to the domains IP address and creating Cname record for the subdomain that you desire.
The problem was that I had to explicitly choose Cloud DNS as my DNS provider. If you have set your DNS zone already, just choose it from the drop-down menu, otherwise create your own...
I had an operational and accessible Bitnami Wordpress site on Lightsail with my domain at GoDaddy. My cert expired so I went to renew it, and also switch my domain from living at GoDaddy to being at Google Domains. Ever since, I haven't been able to load the site by IP or domain. Are there any good guides specifically for configuring this set up?
Bitnami Engineer here,
Please ensure your domain points to the correct IP address (the one assigned to your instance). You can verify that using this online tool:
https://www.whatsmydns.net/
If the domain doesn't resolve to the correct IP address, you will need to update the DNS records in your DNS provider dashboard. Once you confirm everything is configured correctly, you should be able to renew your certificate.
I have domain under which there are multiple subdomains pointing to different websites hosted on azure. I am starting to explore google cloud and want to host a subdomain on google cloud.
Below is how DNS record should look like
A - GO Daddy hosted main website IP address
CNAME - subdomain.example.com - subdomain.cloudapp.net
CNAME - subdomain2.exapmple.com - subdomain2.cloudapp.net
now I want to add a cname for another subdomain to be hosted on google cloud
CNAME - subdomain3.example.com ??.googleapi.com
I have public IP address from GCP, but how do I get subdomain for GCP to be used for CNAME record? As per answers to my another question GCP does not provide public CNAME for VM instances. So what should I provided in CNAME record. (I do not want to move the DNS to google, or to azure for that matter)
Based on your question and the reference to Google not providing names for VM instances, I am assuming that you are trying to create a DNS record for the external address of a VM instance.
If you have a static IP address, you should just configure your DNS provider to use an A record for that IP address, rather than a CNAME.
CNAME records just create aliases for the target names, where A records can point directly to the correct IP.
Note that if the IP on your instance is ephemeral rather than static, then you would need to keep updating the DNS record whenever you restart the instance (and get a new IP), so it would be highly recommended to use a static IP for the instance in this case.
I often use App Engine, for a CNAME, you have to map to ghs.googlehosted.com (https://cloud.google.com/appengine/docs/standard/python/mapping-custom-domains).
It seems possible to do the same on Compute Engine through the network service (https://cloud.google.com/dns/docs/quickstart#create_a_cname_record). If you don't really need the CNAME record, you should use the classical A record. It's a bit easier.
Don't hesite to look into documentations, everything is explained.
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?
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 as NS.
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).
I am new in the Amazon EC2 world, I just created an app, that is located URL like this:
http://ec2-54-123-45-678.compute-1.amazonaws.com:8080
This is generated URL by Amazon EC2.
Now I would need to use my own domain name, so when I would access www.my-domain-name.com, I would like to see the content from
http://ec2-54-123-45-678.compute-1.amazonaws.com:8080
I bought the domain name on Godaddy.
Is there any way to do this in Amazon AWS dashboard or do I need to set it up in Godaddy system?
Thanks
I am answering on a more general level because I stumbled upon this thread when setting my custom domain.
In Amazon I created an instance and associated an IP to that instance. You were able to access it by typing in the amazon url
I actually used Media Temple not GoDaddy, but it will be similar. I went to the zone file and added that public url to the www
And as you can see, here is my blog actually working on the custom domain.
I set the wildcard because that way, no matter what someone types, if it is not set, then they will still see the site.
EDIT
For the root URL you should be entering your elastic IP and setting that as an A record.
First you need to set an ElasticIP for associated to that instance.
Then point the DNS entry of "www" for "my-domain-name.com" to the IP assigned in the step above.
Where you manage your DNS is another thing, can be in GoDaddy or in AWS Route53. You must adjust the delegation DNS in the "my-domain-name.com" register. Ex: your domain can be registered with GoDaddy but its delegation DNS point to Route53 so you can manage the domain from your AWS Console.
In order to setup DNS mapping you can map the existing IP 54.123.45.678 to ex: www.my-domain-name.com.
However, as you are running tomcat which is running at 8080 you need to forward the the request to the tomcat using Apache. So that you can visit www.my-domain-name.com without port 8080. If you are using linux box install Apache, apache-modjk and then configure sites.