Linking a domain registered with one company to a website hosted by a different company can seem complicated. There are several options to consider – frame forwarding, transferring the domain and changing the DNS servers. I think that changing the DNS is often the best option, but it can seem complicated.
In this post I introduce the domain name server (DNS) and what you need to set up. In the next part I’ll describe how to check that you know the address for the right DNS before you make the switch.
The easiest method to link the website and domain may be to use frame forwarding. Frame forwarding is where your domain registrar hosts a page containing a single frame at your domain name (eg http://mysite.com). This frame then loads content from a different web address (e.g. http://mybroadbandprovider.com/~user123/web). I don’t like frame forwarding as the address bar in the browser will always show http://mysite.com, no matter where they go within the framed site until a link isÂ opened in a new window or tab. Then the long ugly address gets displayed in the address bar. External sites trying to link to specific pages have to use the long ugly address rather than the nice short domain name you’ve paid for and registered. Some search engine take a dim view of frame forwarding and so it can affect where you get listed.
Transferring the domain to the company you host at will cost you money, but can help keep everything simple in the medium term.
Changing the DNS setting is the “propper” way to link the hosting and the domain name. It can seem like a black art at first but it is actually quite straight forward. All you have to do is tell the people with whom you registered to use the “domain name server” (DNS) of the company that you host with. I’ve recently changed the DNS setting for a site hosted on GoDaddy with a domain registered with a different company (UKReg / FastHosts). Here I’m posting a couple of tip that I found helpful. This post introduces DNS and the next one covers tools for making sure the transition goes smoothly.
What is a domain name server?
It helps to have an idea of what an authoritative name server is and what it does. The authoritative name server for a domain name will tell your computer the address of the server hosting the site corresponding to that name – its like a phone book for the internet. For example taking the domain name www.yahoo.com and giving back the IP address 22.214.171.124 of the server. Theoretically domain name servers (DNS) work together in a hierarchy, decoding a domain name from right to left, where the dots in a domain name separate each level. The DNS for a level will direct you to the DNS to ask about the next level until you reach the authoritative name server.
For example when looking up “blog.jjhale.com”, the computer asks the “com” DNS for the address. This name server tells the computer to ask the name server which knows about to”jjhale”, which in turn will tell the computer the address corresponding to “blog” in “blog.jjhale.com”. This final domain name server, the one which actually knows the address corresponding to the domain, is called the authoritative name server.
In practice name servers use caching to reduce the load on the top level name servers (.com, .org, .net, etc). When some DNS has been told the address corresponding to a domain name by an authoritative name server it can store it for some period. If asked about same domain name again it can just use the cached address without needing to find and ask the authoritative name server again.
To get a domain name to point to a website hosted on your server (or GoDaddy’s or whoever’s) the authoritative name server has to point to your server. This condition has two parts:
- You need a name server pointing to your hosting server and;
- you need your registered domain name to call that name server its authoritative name server.
When you buy your hosting from the same company that you register you domain from this link up is usually all done automatically for you. If you have a domain registered at one place and hosting somewhere else you need to link these up yourself by changing settings in the two different places.
Setting up the name server
The setting up of the name server needs to be done on the hosting side. In my case the website was hosted on GoDaddy space. I went into the hosting control panel (Hosting -> My Hosting Account, then Manage Account) and clicked on “Domain Management” in the “Settings” section.
Next click “add domain”. Here you enter the domain name (eg jjhale.com) and browse to the folder in your hosting account that you want to be the root of for that domain (i.e. the folder containing the corresponding website). You can also create a new folder to put the site into.
Hit OK and you’ll see the new domain name listed in the table of domains associated with your hosting account. In the status column it will probably say “pending”. In my case it only took a few minutes for the status to change to “Setup”.
The name server is now set up and ready to go. Next you need to make sure that you know the addresses of your DNS. This topic is covered in part two.
Note: When you switch name servers for the domain you’ll have to update setting for any email addresses associated with the domain too (cf. MX records). This is not covered here, but you should be aware of it.