What is a Domain Name?

Melih Firat
6 min readSep 24, 2024

--

Difference between a Domain and URL

The concept of “domain” is one of the cornerstones of websites, which we encounter every day while browsing the internet world and have become a part of our lives. Basically, a domain is a website address presented in an easier-to-remember format. Theoretically, domain name can be everything fits to naming conventions. But practically, we need to keep it short and easy to remember. That’s literally the whole point of the domain!

Beforehand, I would like to inform you that, this website Medium also has a domain. It’s medium.com, and we will come to more about this in a minute.

Real Addresses of Websites: IP Addresses

Behind the curtains, real addresses of websites are actually IP addresses. They generally look like this; 192.168.1.1. This could be medium.com if the domain name wouldn’t exist. How hard to remember, right?

Domain’s key point is to assign easy-to-remember addresses to IP addresses. Let’s navigate to NsLookup.io to see some real life example of domain and IP address relation.

IP addresses for medium.com

We can’t access medium.com through IP address. Because they are “hosted” by Cloudflare. Cloudflare might disable this action, or maybe it’s because they are using a technic called Any cast. Which is a technic that distribute traffic across many servers so and not one. But instead we will visit the website called one.one.one.one.

One.one.one.one uses the IP of 1.1.1.1, and allows direct IP connect, so if you want to connect a website using IP address try 1.1.1.1

Role of DNS

Our machines have something called DNS Cache, and on the web there are DNS Servers. When we enter a domain name in the background, they return domain names into IP addresses automatically.

If you wonder, “What is HTTP?” I cover up in another article!

Domain Name Structure

Generally, a domain name has three parts:

  • 1 — Top-Level Domain (TLD)
  • 2 — Second-Level Domain (2LD)
  • 3 — Subdomain

For example, let’s look at “Google Translate”:

Google Translate’s domain name is “translate.google.com”

  • “translate” is a subdomain.
  • “google” is a Second-Level Domain (2LD)
  • “com” is a Top-Level Domain (TLD)

1 — Top-Level Domain:

It’s the domain places right after the final dot. As mentioned above, translate.google.com domain’s TLD is .com. It usually shows a domains’ general purpose or category.

Typical TLDs are:

  • .com: company, created for commercial organizations
  • .org: organization, usually used by non-profit organizations
  • .net: network, created specially for network organizations
  • .gov: government, special TLD to legitimate and authorize governmental organizations
  • .edu: education, dedicated TLD for organizations focused on education

in addition, every country has their own TLD, for example:

  • .io: British Indian Ocean Territory
  • .de: Germany
  • .es: Spain

2 — Second-Level Domain:

The second level domain is placed right before TLD. Generally represents website name of organizations or individuals. This is more or less the ID of a website.

Below you may find some well known SLDs are:

  • google without .com
  • medium without .com
  • youtube without .com
  • nato without .int
  • usa without .gov

3 — Subdomain:

And lastly, subdomain is taking place before SLD. Subdomains are mostly used to separate main and different services of a website. With an example, this will be covered. Let’s think about google.com, it has many subdomains to separate different google services such as:

  • translate, to translate text.
  • news, for news.
  • maps, for navigation.

And so on.

Domain vs. URL

You might notice that domain name and URL are looking very similar, then what is the difference?

A URL is the location of a unique resource with it’s all information to reach it, whereas a domain name is just the name of your website.

Domain name and URL of this article are:

Domain name: medium.com

URL: https://medium.com/p/9cb077ba375e

As you can see, URL has or can have protocol like “HTTPS://”, path like “/p/9cb077ba375e”, query parameters like “?variable=value” and more

There is something very important to know about domains and URLs. Domains are reversed according to the directory system of today’s modern operating systems. So for example, on your Windows machine, a file path on the desktop is “C://Users/admin/Desktop/file.txt” from left to right, from general to detailed. But in domains this is backwards, medium.com is actually “com.medium” according to the practice in the operating system.

On a web server running on a Unix system, we actually access a file by URL as follows:
com.example.www/users/admin/example-backend/src/index.html

In this sequence where the domain is sorted from general to detailed and the path was kept as it was, we now know why different sites with same subdomain such as “developers” subdomain like “developers.google.com” and “developers.facebook.com” do not conflict with each other. Because they are in or “under” different domains.

Domain Registrar

Companies, people, or offices that are responsible for registering us a domain address are called Domain Registrar. If you register a domain, it won’t automatically get assigned by an IP address. You just be able to reserve that name for yourself. Domain Registrars are accredited by ICANN.

Domain Registrant

The owner of a domain is called the Domain Registrant. That can be individuals or companies, or even a country. Domains can be reserved periodically, generally yearly, 3 yearly, 5 yearly etc. If you don’t renew it, you might lose your domain to someone else. That rarely happens, but can happen!

nissan.com

FUN FACT!: Minecraft tried to buy minecraft.com from their owner (which was someone else than MOJANG) and finally made it. Unfortunately, Nissan couldn’t achieve this. Poor Nissan!

From hostinger.com

FUN FACT 2!: There are something called domain squatting battles, where individuals or other companies are having legal battle to have famous known like domains. For example “amozon.com”.

Domain and IP Relation

We shouldn’t forget, a domain name without mapped to any IP address is only reserved. What does that mean? We have a domain name, but that domain doesn’t point to any server (IP Address). In order to let our domain pointing to our website, we should have hosting service or create our Web Server and configure it’s DNS.

Hosting Service

Hosting is the physical servers that make your website accessible on the internet. These servers are rented or sold to you by service providers. After receiving hosting service, you can direct your domain to these servers by making DNS settings.

Nameserver

Finally, Nameserver is also a type of DNS server. These servers hold the DNS records for your domain. When users enter your domain into their browser, the nameserver will find the corresponding IP address, and this is how your website is accessed.

Conclusion

So, at the end, we can see that a website is like a digital business, such as a pizza restaurant. Let’s say the restaurant is called “Domainos Pizza” and is located at 20° N, 40° E.

The domain is like the name of the restaurant that people ask for when they say, “Where is Domainos Pizza?”. The hosting is the building itself, where all the cooking (content) happens, and it needs to be “planted” somewhere. Finally, the IP address is the precise location, or the physical address of where the restaurant is located — in this case, 20° N, 40° E.

Thanks for reading, and hopefully it helped you to move one step further in this roadmap!

LinkedIn: firatmelih

GitHub: firatmelih

--

--

Melih Firat

Turkish Computer Engineer, trying to explain every step on Backend Roadmap GitHub: firatmelih LinkedIn: firatmelih