My website is hosted by HostGator, but the domain registration is with GoDaddy. My understanding is that the domain registrar - in this case GoDaddy - hosts a service that converts the domain names they administer into IP addresses, and that this is called a nameserver. So GoDaddy is the authoritative source of the information that maps my domain name into an IP address. When I make a change in GoDaddy, the new information gradually propagates to other name servers across the Internet. When someone visits my website, their computer asks its local name server, which asks another name server, and so on until the request gets back to GoDaddy who has the authoritative answer. (I realise there as such things as root name servers but I'm trying to keep things simple.)

Am I right so far?

So why is it that I have just been told that I need to set the name servers in my GoDaddy configuration to point to two that are hosted by HostGator? I've done it but it just doesn't make sense to me. I would have though that if anything, HostGator would need to be pointed to the GoDaddy nameservers, since it is GoDaddy, not HostGator, who maintain the mapping between my domain and its IP address.

I apologise for the obvious confusion in my question. If someone could enlighten me I would be very appreciative!


No, your understanding is a bit off. The domain registrar does nothing except take your money and put your name and address into a database run by the registry for whichever top-level domain you're using. (If that sounds like a bit of a rort, it is). In fact, GoDaddy has nothing to do with your DNS lookups, unless you also use them as a hosting provider (which, by the sound of it, you're not).

All you do with GoDaddy (or whichever domain registrar you're using) is tell them to tell the registry what your nameservers are, so that the registry can tell people who want to get to your domain where to go.

I'd say you probably want to have a good run through the relevant Wikipedia article to get all your ducks in a row.

  • I've also just realised why there was a difference between two sites. With the first site it was necessary only to change the A record in the zone to the new IP address. With the second site I also had to change the name servers. I believe in the first case the nameservers were nothing to do with either GoDaddy or HostGator. In the second case, the nameservers were with HostGator and had been turned off at the same time as the IP address of the hosting instance was changed. The only question that remains now was why ping, FTP and cpanel worked but HTTP didn't (until I changed the nameservers). – Ian Goldby Jul 25 '11 at 7:42

So why is it that I have just been told that I need to set the name servers in my GoDaddy configuration to point to two that are hosted by HostGator?

Because you're likely using shared hosting and depending on load, configuration, maintenance, location (possibly more/different variables), HostGator may change the actual server that your website is hosted on, which means an IP address change, and that would require that they have control over your DNS zone to accommodate that.

It's one of the drawbacks of shared hosting (and why I have a micro instance on Amazon to host all my small business "brochure" sites that get < 1000 unique visitors a month).

A domain registrar is kind of like registering a numbered company: where you register your business has no impact on what street address you lease an office, or where you publish that information, whether it be in the White Pages (nameservers) or not.

  • "[...]would require they have control over your DNS zone[...]" No, this is not correct. This is what aliases and CNAMES are for. There is no requirement to hand over control of one's DNS to a particular provider (or someone other than yourself) for backend differences such as this. – anastrophe Jul 23 '11 at 16:34
  • Host Gator changes your web server's IP from X to Y. How could a CNAME automatically handle this? Also, what do you mean by "alias" as distinguished from a CNAME? – Mark Wagner Jul 23 '11 at 19:44
  • I'm not familiar with the workings of host gator. Most hosting providers - whether shared or dedicated - give you an IP for your machine or instance. Typically they will give the customer a subdomain within the provider's purview - something like 'customer-277a4.hosting.provider.com, which would be kept pointed at your IP, whatever it is at any given time - you then point a CNAME at that subdomain from within your domain. Sorry, I shouldn't have mentioned aliases, they're a feature of djbdns, and don't apply to this. – anastrophe Jul 24 '11 at 5:00
  • @anastrophe: depends on the hosting provider. Dreamhost still maintains that your "unique" IP address may change at any time and while you may setup an A record for that IP, they recommend that you delegate to their name servers. – gravyface Jul 24 '11 at 21:44
  • @anastrophe Can you provide some evidence that most hosting providers "typically...give the customer a subdomain within the provider's purview...which would be kept pointed at your IP?" – Mark Wagner Jul 25 '11 at 17:26

I have to take a slight exception with the answers that womble and gravyface have posted. When you register a domain name, the registrar establishes itself as the SOA (Start Of Authority) for that domain name. By default then, they also establish themselves as the Name Servers for that domain. I don't know of a registrar that doesn't do that.

As for your specific case, if you're using shared hosting from HostGator then you need to use their name servers as gravyface stated. If you're using dedicated hosting then you can use your own private name servers (your own or the ones at the registrar, GoDaddy).

  • Actually, the registrar is not the SOA for a domain name unless you (the domain owner) choose to make them the SOA. And it makes no difference whether one is using shared or dedicated hosting - neither imposes a requirement that a given nameserver be used. In fact, there is no connection whatsoever. In my organization, we have MTA's in our own colo, MTA's in Amazon EC2, we host our own website in our colo, a sub-site in Godaddy shared hosting, and another subsite at a different shared hosting facility. We manage all of the DNS ourselves. The types of hosting are immaterial to the DNS. – anastrophe Jul 23 '11 at 16:30
  • @anastrophe: I'm just saying that all the registrars I've used (NetSol, GoDaddy, Melbourne IT, etc) have established themselves as the SOA upon registering a domain name with them and set their name servers as the name servers for the domain. – joeqwerty Jul 23 '11 at 16:58
  • Understood. Yes, they have to designate somebody as authority when creating the domain initially, even if only for the few minutes between registering, and the user modifying them. – anastrophe Jul 23 '11 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.