fbpx

DNS : The Domain Name System

DNS : The Domain Name System

What is a domain name? How do they work? For that matter, how does this whole ‘internet thing’ work?  These are commonly asked questions. At this point we could get very technical; which might, or might not be helpful to you. So in this short guide we’ve attempted to put together a brief explanation, as simply as we could, to ‘demystify’ many of the basic concepts of how computers are networked together via the internet’s Domain Name System (DNS).

Uniform Resource Locator or URL

Uniform Resource Locator or URL is sometimes referred to as a web address. It points to a precise location of a single resource (file, page, graphic etc.), on a computer network/web server, and the mechanism for retrieving it (a protocol e.g. http). It is typically made up of a protocol, fully qualified domain name (FQDN), and the path, directories (folders), files, resources, parameters etc. Web browsers display the URL of a web page, above the page in the address bar.

Although URLs are used mostly to request a web page (http), other tasks can be performed with different protocols, e.g. file transference (ftp), and email (mailto).

An Example of a Uniform Resource Locator

example url

Subdomain Hierarchy

The domain name system is formed using a hierarchical structure, made up of nodes, separated by dots. Below the top level domains (TLDs), i.e. to their left, are the subdomains.  Each node is a subdomain; and each subdomain is effectively another domain, that is part of a larger domain.

All subdomains occupy a level according to their position in the hierarchy of the URL. A subdomain directly to the left of the top level domain is a second-level domain (SLD). For example, in the domain name example.co.uk, .uk is a ccTLD, and .co is a second-level domain (ccSLD). In practice, second-level domains are often based on the name of a company or service. So, as another example, in the domain name ‘example.com’, ‘com’ is a gTLD, and ‘example’ is a second-level domain. A third node to the left of a second-level domain is a third level domain. This is often used to identify a particular host server, and its implied function. For example, www.example.com indicates a World Wide Web (www) server; whereas, ftp.example.com would indicate a file transfer protocol (ftp) server. By the same token, mail.example.com would indicate a mail server for use with email. Of course, another place you will often see a domain name is following the ‘@’ sign in an email address, e.g. @yourbusinessname.com.

Below a top level domain, there may be any number of second level domains. This is what facilitates the registration of a vast number of domain names under a given TLD, such as “.com” for example. Below each of these second level domains, there may be any number of third level domains, and so forth. There may be fourth or fifth level domains by the addition of more nodes. For example, the full domain name for the California State Government, is a fourth level domain (www.state.ca.us). The possibility exists to create a virtually endless hierarchical subdomain structure.

Subdomain structures

Subdomain Mapping

A subdomain is not a directory or subfolder. However, it can be utilised as one by assigning or ‘mapping’ a directory within the server root to function as the root directory for it. The subdomain then effectively becomes an ‘alias’ for the assigned directory. This way, subdomains are commonly used to simplify server administration, by labelling them according to their assigned function. For example, a subdomain labelled “ftp” could be assigned to a directory used for transferring files, and the storage of logs. Likewise, a “www” subdomain to a directory for holding web pages and other resources. Control over access to the various levels of a domain is implemented by independent authentication (usernames and passwords).

Sometimes organisations use subdomains to administer their different departments, or for separating out translations in to different languages. Many internet service providers (ISPs) allocate subdomains (sometimes with webspace) to clients who’ve yet to decide on a domain name, or for whatever reason, do not wish to own their own domain name. The client can have secured access and administration over that specific subdomain, and build their own website, with a unique third or fourth level URL.

The Root Domain

Taken together, an SLD and TLD form a ‘root domain’. Since the domain system is hierarchical, all levels to the left of a root domain are considered to be subdomains of the root domain. When you register a domain name with a TLD, it is a root domain that you are registering e.g. example.com, or example.uk. However, when you register with a double-node domain such as “.co.uk” you are actually registering under what is already a root domain in itself (.co is the ccSLD of the .uk ccTLD).

data servers

Protocols

Just like in the UK we have a highway code full of rules so drivers can understand each other’s intentions on a public road, the internet is governed by a set of rules and conventions so different machines and operating systems (that would otherwise be incompatible) can understand each other too. These are known as protocols.  In the Domain Name System (DNS) there are many protocols in use, and each performs a separate function, whilst working together as a whole. A few of the protocols that have been around for a long time now include:  tcp/ip; http:, https:, ftp:, smtp:, mailto:, news:, telnet:.

HTTP

The World Wide Web enables  communication between web browsers and web servers through a communication protocol specification called hypertext transfer protocol (or “http”). This protocol is the quickest and most efficient for downloading web resources.

Furthest to the left in a URL is the prefix which denotes the protocol. In a web address, the letters “http” denotes the hypertext transfer protocol. This is followed by a single colon (“:”) which terminates the http scheme and acts as a delimiter between the protocol and the remainder of the URL. Following the colon, the next part is the “authority”. This is the hostname, or domain name (including ports), up to and including the TLD. In the original Uniform Resource Indicator (URI) specifications, a requirement was made for the authority to be preceded by a double slash (“//”) and terminated by the next slash (“/”). It is this authority section of a URL that is assigned an IP address, and points the browser to the correct web host server location on a network.

In the early years of the www, the complete URL including “http://” had to be typed in, otherwise a screen warning of a ‘syntax error’ would be displayed. Over the years “http” became the dominant protocol, and nowadays modern browsers assume the prefix of “http://” should be added, and if it’s missing, automatically fill in these characters for you.

http security

HTTPS and Security

First some terminology: “web servers” are cloud-based computers, and “clients” are (usually) browsers (e.g. Chrome, Firefox, Edge, Safari), but in practice can be any type of device or software program.

There is a more secure version of “http” called “https” (a self-explanatory acronym). It achieves this by using a Secure Sockets Layer (SSL) certificate, which is an encrypted ‘digital key’ to add an extra layer of security during data transmission. The key is installed on the web server, and when present it allows secure connections between web server and client. To show when an SSL certificate is active, a ‘padlock’ symbol is displayed in/near the client’s address bar.

TCP/IP

Computers are much better at using numbers than words and names.  So the Domain Name System (DNS) allows computers to network more efficiently by translating names into numerical addresses. To achieve this, DNS employs (amongst others) a protocol called Internet Protocol (IP) which provides a specific set of numbers called an internet protocol (IP) address to identify every computer or server, and its exact location on the internet. In doing so, the DNS has effectively provided a global directory service at the heart of the internet since 1985.

Humans, on the other hand, find it easier to remember words and names rather than long strings of numbers, so we naturally prefer to use domain names. Records are kept on DNS servers that match up domain names with the IP address of where a website is hosted.  When we type a domain name into a browser, it contacts a DNS server for the record; the domain name is then translated into its ‘computer-friendly’ IP address, and returned to the browser for routing to the correct server, which in turn responds by delivering our web page. Another protocol, called the Transmission Control Protocol (TCP) handles the actual means of transportation and delivery. It works hand-in-hand with IP, and together the suite is known as TCP/IP.

IP Hosting

There are several options available when it comes to hosting a website. When a single IP address is assigned to a web server it is known as a ‘dedicated server’.  This method works well for very large companies, organisations, or ‘power users’ that both need, and can afford it.  For the majority of smaller companies and individual consumers, a cheaper solution is to share server space.  Many sites can be hosted on a single server by various methods such as configuring it with several IP addresses, or to share a single IP address. These methods are known as virtual or shared hosting, and are a much more viable solution for most businesses.

Paths and Directories

To the right of the authority section of a URL we have a hierarchical structure of directories (or folders), paths and files. Since the earliest days of computer network operating systems, slashes have been used to separate directories and files, and to create paths (e.g. Unix and Linux use the forward slash “/”, and MS DOS the backslash “\”). The WWW has inherited a similar structure of forward slashes (“/”) to separate each subsequently lower level, creating a unique path to the location of every single resource within the website.

parameters

URL Parameters

The path may also contain other parts such as URL parameters (query strings or URL variables). They are used to sending (by means of the URL) pieces of information from one web page to another web page; or from client to server. They may contain lots of useful data: from search queries and link referrals, to product details and user preferences, and much more. Furthermore, they feature a lot on ecommerce sites, for example. Parameters are the bits that follow a question mark (?). They typically contain a name and a value separated by an equal sign (=). Multiple parameters can be included in a URL, with each separated by an ampersand (&).

HTML – Hypertext Markup Language

A Hypertext Markup Language document (HTML web page) is a type of file, and is denoted by the file extension “.html”. It contains code on how a page is to be marked up, i.e. the document flow, layout, arrangement and positioning of all its visual and audio page elements. ‘Hypertext’ itself, is a system of presenting information in a ‘non-linear’ order, to enable the reader to hop from one part to another, and read information from any part, in any order they choose (such as navigating around a website). The means of moving around the information in this fashion is achieved by using ‘hyperlinks’, commonly just referred to as ‘links’. Hyperlinks are specific regions in the document, usually highlighted text, or graphics etc., that are encoded with the URL of another location, either in the same, or another document; or on another website altogether. When activated by a click (or some other means) the browser is instructed to load that URL, and display it. Websites are structured using hypertext; supported by other methods such as css, JavaScript, php or asp etc. (any of which may also contain hyperlinks). Hypertext documents are very often ‘mapped’ to a subdomain labelled ‘www’. The letters WWW are an acronym for World Wide Web, which is the concept of a global resource of interlinked hypertext documents published for users to view and share.

http pic

Related Posts