DNS forwarding

1,270 views
Skip to first unread message

Donald Kariro

unread,
Jul 9, 2015, 4:20:05 PM7/9/15
to cloud-dn...@googlegroups.com
Trying to get started with google cloud dns but its almost overwhelming.

I have a domain name on godaddy and currently using their name servers, but i want to move to google dns.

I have an instance running on gce and default port 80 is already occupied. How do I redirect all http requests to my domain name e.g example.com to
a different port of my instance e.g port 8080.

Secondly, how do I prefix my naked domain name with www on google cloud dns, so that in browser it appears as www.example.com.

Thirdly, also suppose the user types the full domain name with www prefix, as in www.example.com, I also want this to be redirected to port 8080 of my gce instance.

Fourthlyly, I am trying to direct godaddy to use my name servers on google cloud dns, but it complains that the names are invalid, It seems godaddy does not accept name servers with hyphens which is used in google name servers, how do I go about this?

Thanks alot in advance, I will appreciate your help! 

Bobby Bush

unread,
Jul 10, 2015, 2:21:23 PM7/10/15
to cloud-dn...@googlegroups.com
Donald,

Google DNS is definitely for someone who understands how DNS works.  I'm going to try to answer your questions.

I would strong encourage you to engage someone who knows more about how the web works before moving forward.  Changing your DNS and not understanding how it works can definitely break a lot of things!

1. It doesn't matter where your domain is registered at.  You can set the name servers of your domain to any valid name server and it should work fine.
2. DNS cannot redirect ports. If port 80 is already in use and you aren't able to solve that problem, you would need to tell people to go to port 8080.  IE, your website would be http://www.example.com:8080 or put a redirect at whatever is running on port 80 to redirect everyone who comes to port 80 to http://www.example.com:8080.  Honestly, this is bad form.  Websites are traditionally always hosted on port 80 so that people can easily get to them.  Browsers by default will expect the site to be on port 80.
3. You prefix your naked domain with an A Record.  So www -> A Record -> Your Server IP and you point your root record as well to an A Record -> Your IP.  When someone goes to your website, your web application will need to redirect them to the www.example.com from example.com
4. See Number 2
5. This shouldn't be a problem.  Read Item 1.  Here is GoDaddy Directions on how to do it.  https://www.godaddy.com/help/setting-custom-nameservers-for-domains-registered-with-us-12317
Reply all
Reply to author
Forward
0 new messages