LearnPart 1 of 8
What is a domain name?
A domain name is the human-friendly name of a place on the internet, like example.com. You register it through a registrar, usually a year at a time, and point it at a website, an email service, or both.
In 30 seconds
- A domain is a name for a place on the internet, so people don't have to remember number addresses.
- You rent it from a registrar a year or more at a time, and renew it to keep it.
- Read it right to left: the extension (.com), then your name (example), then any subdomains (www).
- On its own it does nothing. Settings called DNS records point it at your website and your email.
Words with a dotted underline explain themselves: tap or hover them.
The short version
Every computer on the internet, including the servers that host websites, has a numeric address called an , like 203.0.113.10 or 2001:db8::10. Numbers like these are hard to remember and change when a site moves to a new server.
A domain name solves that. It is a name you can say out loud and type, and the internet's naming system, , turns it into the right number every time someone uses it. Think of the contacts on your phone: you tap a name, and the phone dials the number stored with it. If the number changes, you update the contact and everyone keeps using the same name.
You never buy a domain outright. You register it for one to ten years and renew it. While you keep renewing, it is yours to use and nobody else can register it.
The parts of a domain name
A domain name is a list of labels separated by dots. Read it from right to left: each label sits inside the one to its right.
- The extension on the right, like .com or .co.uk, also called the top-level domain or TLD. It tells you which organisation, the , keeps the list of names under it. Extensions explained.
- The name to its left, like example. This is the part you choose and register. Together with the extension it makes your registered domain, example.com.
- Anything further left, like www or shop, is a subdomain. The owner of example.com creates these for free, as many as they like. Subdomains explained.
Type anything below to see its parts labelled.
Everything happens in your browser; nothing you type is sent or saved.
shop.example.co.uk is a subdomain of example.co.uk. Whoever registered example.co.uk can create it for free. Its extension .co.uk has two levels: .uk is the country code and .co is a category under it.
| Registered domain | example.co.uk |
|---|---|
| Subdomain | shop |
| Hostname | shop.example.co.uk |
| Extension | .co.uk |
| Levels | Two-level extension |
| Type | Country code (ccTLD) |
| Run by | Nominet |
The tree every domain hangs from
All domain names form one upside-down tree. At the top is the root, written as a single dot. Under it sit the extensions: com, org, uk, de, app and more than a thousand others. Under each extension sit the names registered in it, and under each name, its subdomains.
Every domain name secretly ends in that root dot. Written out in full, example.com is example.com., which is called a fully qualified domain name (FQDN). You rarely type the final dot, but you will see it in DNS settings and zone files.
Responsibility follows the tree. The root servers know who runs each extension. The registry for .com knows which nameservers hold the records for example.com. And example.com's nameservers know the addresses of www.example.com, mail.example.com and everything else below it. See a lookup step by step.
Domain, hostname, URL, website: the difference
These words get used interchangeably. They mean different things.
| Term | Example | What it is |
|---|---|---|
| Domain name | example.com | The name you register and renew. |
| Hostname | www.example.com | A full name that points at one machine or service, often a subdomain. |
| URL | https://www.example.com/pricing | A complete web address: protocol, hostname and path. |
| Website | The pages you see | Files and code on a web server, which the domain points to. |
| IP address | 203.0.113.10 | The numeric address DNS turns a hostname into. |
| Email address | hello@example.com | A mailbox name, then @, then the domain that receives the mail. |
Nameservers: where a domain's settings live
A domain's settings, its DNS records, are kept on a set of servers called . When you register a domain, your records two to four nameserver names with the registry, such as ns1.your-dns-host.com. Every lookup for your domain ends up asking those servers.
The company running those nameservers is your DNS host. It is often your registrar, but it can be anyone: a CDN, your web host, or a dedicated DNS service. Changing nameservers moves all of a domain's records to a new home in one go, so copy every record across first, especially the email ones.
The records themselves say where things go: A record and AAAA record for websites, MX record for email, TXT record for proofs and policies, CNAME record for aliases and NS record for the nameservers themselves. The DNS records guide covers every type.
What a domain name can contain
| Rule | Detail |
|---|---|
| Characters | Letters a to z, digits 0 to 9 and hyphens. Other alphabets work through IDNs, below. |
| Hyphens | Allowed in the middle, never at the start or end of a label. Two hyphens in positions three and four are reserved for IDNs. |
| Label length | 1 to 63 characters between dots. |
| Total length | Up to 253 characters including the dots. |
| Capital letters | Ignored: EXAMPLE.com and example.com are the same name. |
| Spaces and symbols | Not allowed. No spaces, underscores, accents (except through IDNs) or punctuation. |
| Minimum length | Set by each registry. Most allow names from one to three characters up. |
Domains in other alphabets (IDNs and punycode)
DNS was built for plain English letters, but domain names now work in Arabic, Chinese, Cyrillic, Greek, Hindi, Japanese and many more scripts. These are internationalised domain names (IDNs).
Behind the scenes each label is converted to an ASCII form called punycode, which starts with xn--. Your browser shows münchen.de, while DNS sees xn--mnchen-3ya.de. Extensions can be internationalised too: Russia's .рф is xn--p1ai.
Some characters from different alphabets look identical, like the Latin a and the Cyrillic а. Browsers watch for names that mix scripts to imitate a familiar brand and show the punycode form instead, so if a link shows xn-- where you expected a familiar name, be careful. Convert any name with the punycode converter.
What a domain does on its own
Nothing, until you add DNS records. A freshly registered domain is a reserved name. To make it useful you point it at services:
- A website, with A, AAAA or CNAME records pointing at a web host. How that works.
- Email, with MX records pointing at an email provider, plus SPF, DKIM and DMARC so your mail is trusted. How that works.
- Proof of ownership for other services, with a TXT record they ask you to add.
- Apps and tools on their own subdomains, like app.example.com or status.example.com.
You can check what any domain is set up to do with a free domain report.
Questions people ask
Do I own my domain name?
Not outright. You hold the right to use it for as long as you keep renewing the registration, usually one to ten years at a time. While you do, nobody else can register it, and you can move it to another registrar whenever you like.
What is the difference between a domain and a website?
The domain is the name. The website is the set of pages, which live on a web server somewhere else. DNS records connect the two, so you can keep the domain and move the website to a different host at any time.
What is the difference between a domain and a URL?
A URL is a full web address: protocol, hostname, and usually a path, like https://www.example.com/pricing. The domain is one part of it, example.com.
Is www part of my domain name?
No. www is a subdomain, a name the domain owner creates for free under their domain. www.example.com and example.com are two different hostnames that usually point at the same website.
Are domain names case sensitive?
No. Example.COM, example.com and EXAMPLE.com are the same domain. Only the path after the domain in a URL can be case sensitive.
How long can a domain name be?
Each part between dots can be up to 63 characters, and the whole name up to 253 characters. Short names are easier to type and remember, so most people stay far below the limits.
Can a domain exist without a website?
Yes. A registered domain with no DNS records pointing anywhere simply doesn't load. Many domains are used only for email, held for a future project, or kept so nobody else gets them.