What Is a Domain Name and How Do They Work?
A domain name is a human readable name which can be accessed by a client or a browser. The domain name maps to an IP address which is how the source and destination machines communicate.
What is a Domain Name?
Domain names are human readable names that are assigned by DNS (Domain Name System) to an IP address. This IP address is assigned to a device, but because IP addresses, especially IPv6 addresses, are difficult to remember and subject to change, it’s best practice to use domain names to identify servers and other devices.
For example, if you ping google.com you’ll find out that one of the addresses is 220.127.116.11. You could go to your browser and type in 18.104.22.168 and that will take you to google.com. However, that’s hard to remember and Google could also decide to no longer use that address. So, typing in google.com is much easier to remember as well as a better practice so that you’re not reliant on an IP address.
How Domain Names Work?
Most people are familiar with typing a URL into their browser to get somewhere, but what does the domain name actually do? Externally, or outside of a company’s private network, they might have a public domain name they registered with a domain name registry. There are several popular registrars out there such as domain.com, Name Cheap, Host Gator, etc. These registrars allow you to pick a unique name such as example.com and pay for the right to use that name for one or more years depending on the contract so that others may use it to find you. These public domain names are generally used to provide information, communication, and services.
Internally, we have domains, as well, often created using software like the Microsoft Active Directory Domain Controller. So you may have an internal domain name such as example.net. While this also provides information, communication, and services to your employees, it can also provide an easy way to apply security and other policies to a segment of an internal network. In both cases, the domain name again provides an easy to remember way to access or refer to a destination.
The following steps break it down:
- A user will type in a URL or domain name on some sort of client software, such as a browser, command line, or other UI.
- The client will ask the DNS server that it has been directed to go to if that DNS server is aware of this domain name.
- If the DNS server is aware, then it will send back the appropriate IP address so the client and destination can start to communicate. If the DNS doesn’t know about the name, it will go to the next DNS server in line such as the second level domain server and so on, until either the IP address is found or the top level domain (TLD) server is reached and returns an IP address.
- The first DNS server will cache that information for a time (according to the TTL) to make the next time someone tries to access that server a little shorter.
- The client can now start to communicate directly with the destination server which has that domain name.
Difference between a Domain Name and URL
Often the terms domain name and URL are used interchangeably, but that’s not accurate. A URL is a Uniform Resource Locator and is sometimes also referred to as a web address. The main difference between a URL and a domain name is that while a domain name is just the name that corresponds with the IP address, a URL gives the entire path to the destination with instructions on how to get there.
A URL contains the protocol which should be used, for example http or https. It will contain subdomain information, which could be www or something like blog or docs are also common. The URL contains the domain name within it as well. And then it has the specific path or page on that destination server which the client is trying to access.
Different Types of Domain Names
The organization ICANN (Internet Corporation for Assigned Names and Numbers) is responsible for domain names. There are various rules assigned by ICANN that need to be adhered to, depending on the type of top level domain you’ll be using in your domain name.
ICANN also accredits registrars like the ones mentioned above in the How Domain Names Work section.