Short answer
A domain name is a human-readable name, such as example.com, that identifies a part of the internet controlled by one owner. It is made of labels separated by dots and read from right to left: the top-level domain (com), then the name registered under it (example). DNS turns domain names into the IP addresses computers connect to.
The parts of a domain name
Take www.shop.example.co.uk. Read from the right:
uk: the top-level domain (TLD), here a country code.co.uk: a public suffix run by the UK registry under which people register names.example.co.uk: the registered domain, the part you buy and control.shopandwww: subdomains, which the owner creates freely, as many as they like.
For example.com the name directly under the TLD, example, is called the second-level domain. Each label can be up to 63 characters of letters, digits and hyphens, and a full name up to 253 characters. Domain names are not case-sensitive: Example.COM is the same name.
Types of top-level domain
| Type | Examples |
|---|---|
| Generic (gTLD) | .com, .net, .org, .info |
| Country code (ccTLD) | .uk, .de, .my, .jp; two letters from ISO 3166 |
| New gTLDs | .app, .dev, .shop, .london, hundreds added since 2013 |
| Sponsored / restricted | .gov, .edu, .mil, .int |
| Infrastructure | .arpa, used for reverse DNS |
Some ccTLDs are marketed worldwide for their look, such as .io, .co, .ai and .tv, but they are still run under that country's rules.
Registries, registrars and ICANN
- ICANN coordinates the domain system globally: it decides which TLDs exist and accredits the companies that sell gTLD names. Its IANA function maintains the root zone, the list of all TLDs.
- A registry runs one TLD and its database: Verisign runs .com and .net, Nominet runs .uk, and each country chooses its own ccTLD operator.
- A registrar sells names to the public and passes the registration to the registry. You rent a domain for one or more years and must renew it; if it lapses, someone else can register it.
The owner then points the domain at name servers (its NS records), which hold the DNS records saying which IP addresses its names use. You can see these for any domain with the DNS lookup.
Internationalised domain names and punycode
DNS itself only carries ASCII letters, digits and hyphens. To allow names in other scripts, internationalised domain names (IDNs) are converted to an ASCII form called punycode, marked with the prefix xn--:
münchen.de → xn--mnchen-3ya.de
bücher.example → xn--bcher-kva.example
Browsers show the readable form, but may fall back to the xn-- form when a name mixes look-alike characters from different scripts, for example a Cyrillic "а" in place of a Latin "a". That protects against homograph phishing domains.
Domain vs hostname vs URL
| Term | Example | Meaning |
|---|---|---|
| Domain | example.com | A name and everything under it, controlled by one owner |
| Hostname | www.example.com | A name that points to a specific machine or service |
| FQDN | www.example.com. | Fully qualified: the complete name, with the root as a trailing dot |
| URL | https://www.example.com/page?id=1 | A full address: scheme, hostname, optional port, path and query |
A domain can also be a hostname: example.com itself usually has an address so it works without www.
Looking up a domain
The DNS lookup shows a domain's A and AAAA addresses, mail servers, name servers and TXT records, for example /dns/google.com. Click through to any address to see which network and ASN hosts it. Registration details (registrar, creation and expiry dates) are in the registry's RDAP or WHOIS service, often with the owner's personal data hidden.
[ FAQ ]
Frequently asked questions
Do I own a domain name once I buy it?
Not permanently. You register the right to use it for a period, usually one to ten years, and must renew it. As long as you renew and follow the registry rules, nobody else can register it.
Is www part of the domain name?
No. www is a subdomain the owner chooses to create. Most sites make both example.com and www.example.com work and redirect one to the other.
What is the difference between a registrar and a registry?
The registry runs the database for a whole TLD, such as Verisign for .com. The registrar is the shop you buy a name from; it sends your registration to the registry.
Why do some domains start with xn--?
That is punycode, the ASCII form of an internationalised domain name that contains non-Latin or accented characters. Browsers normally display the readable version.
Last updated · All articles · API docs