Developer of the interwebs, advocate for technology for good and awesome, enjoyer of fine ales and good food.
17 Apr 2014
Wondering why I'm blogging about this? Read more about my quest for badges!
The web is full of acronyms, thrown about by people like me as shorthand for the myriad of different systems which are involved in getting a web page out of the mind of the developer and into your web browser. One of these acronyms is DNS, three little letters which pretty much underpin the entire internet as you know it. They stand for "Domain Name System", and I'm going to explain what DNS is, why it's important and how it works.
Before I can leap into DNS, I need to explain a bit about how the Internet works. If you've watched a 'hacker' movie before, you will likely have seen a scene in which someone sits at a computer, bangs a few keys and spits out a screen like this one:
In the middle of all the nonsense you will spot a series of numbers separated by dots. This is an IP address, in this case
220.127.116.11. Exactly how IP addresses are made up, how they are handed out and how they work behind the scenes is a very, very long topic to try and tackle so I won't bother; instead, just think of an IP address like a phone number. Each computer on the Internet has one (or — more accurately — has access to one, a bit like how more than one person can share a landline number).
Every time your web browser wants to get part of a website, it needs to use the IP address to contact the relevant computer and get hold of the content. However, you'll note that when you visited my blog today you didn't type
18.104.22.168 into your address bar (and it won't be showing that now, take a look). Instead you typed
nickjackson.me, or followed a link to the same thing. Clearly then there is some magic happening in the background to turn one into the other, and this is where DNS steps in.
Back in the good old days when people still had to go outside, telephones didn't have built-in phonebooks. Instead the only way to find out someone's phone number was to actually go and ask them — and this is exactly how the Internet worked. To communicate with another computer you had to know their particular sequence of numbers, and the human brain really sucks at remembering sequences of numbers. It turned out that the telephone industry had also run into this problem, and had come up with an ingenious solution.
Directory enquiries, represented here by the 118 118 men, meant that armed with nothing more than a name you could call up directory enquiries and in return find out the number of the person you wanted to speak to. The Domain Name Service, or DNS for short, is the Internet's version of a directory enquiry service; letting a computer look up a name and find out the number. Instead of having to remember that Google was at
22.214.171.124 and P2PU was at
126.96.36.199 you could instead remember
That covers the what and the why of DNS. The exact details of how are quite long-winded, but I'll summarise what's going on here so you've got a more complete idea of what's going on.
nickjackson.meas an example.
nickjackson.me. This is the equivalent of keeping a phonebook yourself, it has recently used numbers in for a quick lookup.
.mepart of the address. Try
And lo, the DNS system is explained in 10 easy steps.