|
Configuring DNS |
A 'How To' Guide for the Nanopublisher |
You can avoid paying monthly fees to ISPs for webhosting if you have your own server permanently connected to the internet. Once you have the server, and it is all set up to host a website, the only other thing you need to do is to register your desired domain name and set up DNS. You can register your name at one of the many available name registration services. Good, and relatively inexpensive, is GoDaddy. By registering the name you take ownership of it, however that is not enough. You must also let the world know that the name is yours and you have to link your server to the name. That is where DNS comes in. DNS is an acronym for Domain Name System. It serves the same purpose for internet domain names that the telephone directory does for phone numbers. There are DNS servers on the internet, and you need to contract with one or more of them to serve your name (DNS servers are also and perhaps more commonly referred to as name servers). Then, when someone enters your name into their browser, the browser will go to the DNS server to find the address of your site. Such a query might go something like this ...
1. Imagine that I type your domain name into my browser, www.your-domain.com. I have never been to your site so it does not know the address of your web server. So it goes to the DNS server for my ISP and asks if it knows the address of your domain.
2. If the DNS server has not looked up the address of your site recently, it will contact a higher level DNS server. Otherwise it will check the address it has to see if it is recent enough to still be valid. If so, it will return the address; otherwise it will pass the request on to a higher-level DNS server.
3. Eventually the request could get to the DNS server for the top-level domain associated with your domain. In this example, the top-level domain is .com. When you registered your name you gave the register the address of your DNS server, which your register then passed on to the DNS server for the appropriate top-level domain. This server will then pass that address back to the name server for my ISP.
4. It will then query your DNS server for the address of www.your-domain.com, which it then passes back to my browser.
Your DNS server is acting as an authoritative name server for your domain. In this search, my ISP's DNS server is acting as a caching name server. It will serve the name if it has seen it recently and remembers the address. My browser also caches the address.
When an address is given out by a DNS server, it is accompanied by its "time to live" or TTL. This specifies how long the address can be used before the address is considered stale and should be refreshed by once again asking the authoritative DNS server for your domain. It can be as long as a day or two or as short as a few minutes. The TTL is necessary to reduce the amount of traffic to DNS servers, but it also causes a delay between when you make changes to your domain's address and when anyone on the internet will know them. If you anticipate making changes to your DNS information, you should temporarily reduce the TTL and then return it to a reasonable value after your DNS information has stabilized.
You should have several authoritative DNS servers, just in case something happens to one of them. For example, a DNS server may go down or it may get attacked. You will need at least two servers. Ideally they should be dispersed. You want them geographically dispersed in case something happens to a particular region of the country, for example like a power outage over a large region or an important network trunk line being accidentally cut. You should also disperse your DNS servers between providers. I personally have had my site become unavailable when someone launched a denial of service attack against another site's DNS provider, which also happened to be mine. To support several authoritative DNS servers without them accidentally becoming inconsistent with each other, you can designate one to be a primary name server, and the rest to be secondary. The secondary servers would then regularly query the primary for updates. You could then make changes to the information about your domain on your primary name server, and it will automatically get propagated to your secondary name servers, and then eventually to the entire internet.
When you register your name, but get a name of the form my-site.com. This is referred to as your domain name. You also get the right to all subdomains. The most common subdomain is www, which is generally used to serve web sites. Thus, a visitor would enter www.your-site.com into their web browser and would be taken to your site. There are other common subdomains. For example, the mail subdomain (mail.your-site.com) is often used for mail servers. Large organizations might create subdomains to serve particular departments. For example, the University of California at Berkeley has a domain name of berkeley.edu, but the Electrical Engineering and Computer Science department uses eecs.berkeley.edu. However, you are free to use your subdomains any way you choose. For example, Yahoo used a subdomain to create my.yahoo.com for its personalized web pages and Google uses news.google.com for its news pages.
The DNS server shares the IP address of your server with whomever in interested in visiting your site. You server either has a fixed or static IP address or a variable or dynamic IP address. Whether you have a static or dynamic IP address depends on your ISP. If you have a static IP address, which you often have to pay a bit more for, then gave you your IP address when you signed up. It is a series of 4 numbers separated by dots. It will look something like 35.125.13.243. Each component of this address can be a number between 0 and 255 inclusive. If your ISP gave you a dynamic IP address, then your server uses a service called DHCP to ask for it automatically. Thus, your IP address is assigned arbitrarily from a range of available addresses when it first starts up and can change without notice. This is a problem for traditional DNS servers because they configured to give out a fixed address. Thus they work for static IP addresses but not for dynamic IP addresses. In this case, you will need a special server that is specially designed to serve dynamic IP addresses. You will then have to configure your server, or perhaps your firewall, to communicate your updated IP address to your DNS server whenever it changes. Your dynamic DNS service can help you set this up.
There are many available commercial DNS service providers, and they are easily found with a search engine. There are also a few that will serve the name for your site free of charge. The one I use, and have been quite happy with, is ZoneEdit. They provide DNS services for your first 5 sites free of charge, and after than they charge a reasonable rate. You can use The Public DNS Service for free with any number of sites, but it is a much more difficult service to use. Others to consider include EveryDNS, Sitelutions DNS, or Xname. Twisted4Life is another available free DNS service, but it only provides secondary DNS service and so would be used with another service to provide dispersal over more than one provider. Yet another free service is Free DNS, but you should be wary of this one as it appears to give away your subdomains to other customers.
I am less familiar with the providers of dynamic DNS service. Some of the providers already mention also provide dynamic DNS. I have used a service named DynDNS. It was originally free, but now does charge for its service.
These services generally provide a web based interface for describing your names in a relatively easy to use manner. At a minimum your will need to give the IP address of your server or servers (this is referred to as an A record). You will also need to specify your desired subdomains. You can do this by providing additional A records, or if they reside at an address that has already been given, you can use an alias or CNAME record. If your server will also be accepting mail, then you should specify its address in a mail exchanger or MX record. Otherwise your DNS provider might be able to arrange mail forwarding for your site.
A useful set of DNS utilities is available from DNSstuff.com. Of particular importance is dnsreport.com, which can be used to thoroughly test your DNS configuration. This report usually complains about you not having provided SPF, but the warning can be ignored. SPF can be tricky to set up properly and at this point in time is widely ignored. If you are a stickler for detail, you can find more information about how to configure SPF in DNS for Rocket Scientists.
![]() |
![]() |
![]() |
Any questions or comments on these notes can be directed to theNurds@nurdletech.com.
| Created and hosted by |
|||||||||||