Originally published on CodingCush.
A domain name is the human friendly address of a website, like codingcush.com. Type it into your browser and it takes you to the right site. Behind the scenes, the name points to a numerical IP address, and the Domain Name System (DNS) does the translation. This guide explains what a domain name is, its parts, how it connects to DNS and IP addresses, and how to register your own.
What Is a Domain Name, in Plain English?
Think of a domain name as the name on a house. The house has a numbered street address, but visitors remember the name, not the numbers. A domain name is that easy name, standing in for a hard to remember number.
Every website lives on a server, and every server has an IP address, a set of numbers like 198.18.61.120. Typing that would work, but nobody wants to memorise it, so we use words instead. There are now more than 300 million registered domain names, according to the Cloudflare guide to what a domain name is.
A domain name is not the website itself, and it is not the hosting. It is only the address, rented from a registrar for one year at a time.
The Parts of a Domain Name
A domain name has three pieces, separated by dots. Read from right to left, they go from most general to most specific.
Top level domain (TLD). The part after the last dot, like .com, .org or .in. Some describe an organisation type, like .org, and some a country, like .in for India.
Second level domain. The part to the left of the TLD, and the name people choose and remember. In codingcush.com, "codingcush" is the second level domain.
Subdomain. Anything to the left of the second level domain. In www.codingcush.com, "www" is a subdomain, and in blog.codingcush.com, "blog" is one. Subdomains let one domain run sections like a blog or a shop.
| Part | Where it sits | Example in blog.codingcush.com |
|---|---|---|
| Subdomain | Left of the second level domain | blog |
| Second level domain | Left of the TLD | codingcush |
| Top level domain (TLD) | After the last dot | .com |
How a Domain Name Finds a Website
Type codingcush.com into your browser and a short chain of lookups runs in a moment. Your browser asks a DNS resolver for the IP address behind the name, the resolver tracks it down through the root and .com servers, and the answer comes back. Your browser connects, and the site loads.
This system is called DNS, and it works like a phone book for the internet: names in, numbers out. Our simple guide to DNS walks through each step in more detail. The number at the end is the IP address, and our guide to what an IP address is and how it works explains that side.
Your computer caches recent answers, so repeat visits load faster, but a changed domain can take a while to show the new site.
Try It Yourself: Look Up a Domain with Python
Python has a built in module called socket that does this lookup in one line. Save this as dns_lookup.py and run it with python3:
import socket domain = "codingcush.com" ip_address = socket.gethostbyname(domain) print(domain, "->", ip_address) Output:
codingcush.com -> 198.18.61.120 The import loads Python's socket module. The domain variable holds the name to resolve. The socket.gethostbyname() function asks your system DNS resolver for the IP address behind that name, exactly like a browser does.
The exact address can change, because a site can move to a different server, so do not worry if your run shows a different number. Try it with google.com or github.com and you will see the same pattern.
The ICANN For Beginners page.
How to Read a Domain Name
Reading a domain name is a small skill that helps you tell where a link really goes. Start from the right. The TLD tells you the type or country, the second level domain tells you the brand or owner, and anything to the left tells you the section.
Take shop.codingcush.com: .com is a commercial TLD, codingcush is the owner, shop is the section. Now en.wikipedia.org: .org suggests a non profit, wikipedia is the owner, and en is the English language section.
This habit also protects you from lookalikes. A scammer might register codingcush-support.com, or codingcush.com.example.com, where the real domain is example.com. Reading right to left shows the true owner every time.
Domain vs URL vs Hosting
Three things that sound similar but do different jobs:
| Domain name | URL | Hosting | |
|---|---|---|---|
| What it is | The readable address of a site | The full address of one page | Server space holding the site files |
| Example | codingcush.com | https://codingcush.com/what-is-dns-explained-simply | The web server holding the files |
| What it does | Points visitors to the right server | Points the browser to one exact page | Stores and sends the site files |
| Do you need it? | Yes, for a named website | Every page has one automatically | Yes, the site needs it |
Hosting is the house, the domain name is the street address, and the URL is the directions to one room inside the house.
How to Choose and Register a Domain Name
Picking a good name is worth a little thought, because changing it later confuses visitors. Keep it short, easy to spell out loud, and easy to remember after hearing it once. Avoid hyphens and numbers: people forget whether it was a dash or a "2".
Stick with a familiar TLD. A .com is the easiest for most people to remember and trust, and a country TLD like .in suits a mostly local audience.
To register a name, pick a registrar, a company allowed to sell domain names, and search for the name you want. If it is free, you pay a yearly fee. The ICANN beginners guide to domain names explains how registries, registrars and registrants fit together.
Turn on auto renewal so it never quietly expires, and add domain privacy if your registrar offers it, so your personal details stay out of the public WHOIS record. If your first choice is taken, add a word describing what you do. And if your home Wi-Fi feels slow while you research, our guide on why your Wi-Fi is so slow and how to fix it may help.
Common Mistakes and Troubleshooting
Typing the name wrong. One missing letter sends you to a different site or nowhere. Double check the spelling, and watch out for lookalikes like "rn" pretending to be "m".
Forgetting to renew. A domain is rented, not owned forever. If it expires, your site and email stop working, and someone else can register the name. Turn on auto renewal.
Seeing the old site after a change. After pointing a domain at a new server, DNS changes take time to spread, usually minutes to hours. Clear your browser cache, wait a little, and check again.
www works but the bare domain does not. www.codingcush.com and codingcush.com are technically different addresses. Your settings need to cover both, usually by redirecting one to the other.
"This site cannot be reached" right after registering. A new domain needs a few minutes for DNS to start answering, and your site needs hosting and files behind it. A name alone shows nothing until you point it at a server with a website on it.
Frequently Asked Questions
Is a domain name the same as a website?
No. A domain name is only the address. The website is the pages and files on a hosting server. You need both.
Do I own my domain name forever once I buy it?
No, you rent it. Registration usually lasts one year, and you renew it to keep it. Stop renewing, and the name eventually becomes free for anyone else.
Can two people own the same domain name?
No. Each domain name is unique, and only one person can register it at a time.
What is the difference between a domain and a subdomain?
A domain is the main address, like codingcush.com. A subdomain is an extra section to the left, like blog.codingcush.com. Subdomains are free once you own the main domain.
Do I need a domain name to build a website?
Not strictly. You can build and test on a free subdomain or a local address on your own computer. But for a real public site, your own domain is close to essential.
How much does a domain name cost?
Most common names cost a few dollars a year, roughly the price of a coffee or two, though popular names can cost far more. Check the renewal fee, not just the first year price, before you buy.
Conclusion
A domain name is simply a website's human friendly address: a readable name that DNS turns into a numerical IP address so your browser can find the right server. Read it right to left to see the TLD, the name and any subdomain. Now pick a memorable name, register it, turn on auto renewal, and your corner of the internet is ready.
