---
title: 'What Is a Domain Name'
source: 'https://academia.sh/en/courses/how-the-internet-works/what-is-a-domain-name'
course: 'How the Internet Works'
language: en
updated: '2026-08-17T18:07:03+00:00'
license: 'CC BY-SA 4.0'
---

# What Is a Domain Name

The indirection between name and address, the name hierarchy made of labels, the delegation of authority, and the roles in the registration process.

The previous topic established that reaching a server requires an address. Even so, you
did not type `192.0.2.10` into the address bar; you typed `example.test`. The two forms
point to the same server, but the difference between them is not only readability.

This lesson examines the name itself: how it is structured, who owns it and why a
separate layer sits on top of the address. Translating the name into an address is the
next lesson's subject.

## The Reason for Indirection

Separating the name from the address solves two distinct problems.

**Memorability** is only the first of these, and the less important one. People struggle
to remember number sequences; names carry meaning.

**The ability to break the link** is the real reason. As established in the previous
lesson, an address is a statement of location: when an organization moves its server to
another provider, the address must change. If the address were used directly, the move
would affect every user — the value everyone knew would become invalid.

Once a name layer sits in between, the move reduces to updating a single record. The
name stays fixed; the address it points to changes. The user does nothing.

The same indirection works in the other direction too. A single name can point to
multiple addresses; requests are distributed among them. A single address can also host
multiple names — the subject of this topic's last lesson. The relationship between name
and address is not one-to-one.

This is a pattern that recurs throughout computer science: placing a stable name over a
value that can change. It is the same idea as variable binding from the Programming
Fundamentals course; the code that refers to the name does not change even when what the
name points to does.

## The Structure of a Name

A **domain name** is a sequence of **labels** separated by dots. The hierarchy is read
not left to right but **right to left**: the rightmost label denotes the most general
level.

```python
def split_labels(domain_name: str) -> list[str]:
    """Splits domain name into labels; root is rightmost."""
    return domain_name.rstrip(".").split(".")


for domain in ["example.test", "www.example.test", "file.archive.example.test"]:
    labels = split_labels(domain)
    print(f"{domain:<27} {len(labels)} labels  verification order: {labels[::-1]}")
```

```
example.test                2 labels  verification order: ['test', 'example']
www.example.test            3 labels  verification order: ['test', 'example', 'www']
file.archive.example.test   4 labels  verification order: ['test', 'example', 'archive', 'file']
```

Reading this sequence on a tree gives the right intuition. The tree terminology from the
Data Structures course applies here exactly as it does there: each label of the name is
a node, and the full name is the path from the root to that node.

- The **root** is the dot at the very right of the name, and it is usually left unwritten.
  Writing `example.test` is shorthand for `example.test.`. The form with the trailing dot
  written out explicitly is called a **fully qualified domain name**.
- The **top-level domain** is the label directly under the root: `test` in the example.
- The label under that is the registered name: `example`.
- Labels further to the left are **subdomains**, created at the name owner's own
  discretion: `archive`, `file`.

The `www` label carries no special meaning. It is an established convention; technically
it is no different from any other subdomain. `example.test` and `www.example.test` are
two separate names and can point to different places.

## Label Rules

Labels are not free text. Their length is limited and their comparison rules are
defined.

```python
def split_labels(domain_name: str) -> list[str]:
    return domain_name.rstrip(".").split(".")


print(len("a" * 63))
print(all(len(label) <= 63 for label in split_labels("file.archive.example.test")))
```

```
63
True
```

A label can be at most 63 characters, and a full name at most 255 characters. These
limits come from the field widths of the form in which the name is carried over the
network.

Names are **case-insensitive**: `EXAMPLE.TEST` and `example.test` denote the same name.
This rule, however, applies only to the name; it does not apply to the path portion of
the address bar, and that distinction is covered in the Journey of a Web Request topic.

The native character set for names is limited to letters, digits and the hyphen. Names
that contain characters outside this set — including non-ASCII letters — are represented
with an encoding that maps back into the limited set. The distinction established in the
character encoding lesson of the How Computers Work course holds here as well: the form
shown to the user and the form carried over the network need not be the same.

## The Delegation of Authority

The real function of the name hierarchy is not to look tidy but to **divide
responsibility.**

An authority at the root level decides which top-level names will exist. That authority
delegates management of the names under each top-level name to that name's operator.
When the operator hands the name `example` to an owner, authority over everything under
`example.test` passes to that owner.

The consequence of delegation is this: creating the subdomain `archive.example.test`
requires no one's permission. The name owner has unlimited authority within its own
subtree. The root authority is not even aware these names exist.

This is the same principle as the autonomous system structure from the previous lesson:
singularity at the top level, autonomy at the lower level. The only thing that must be
singular is who is authoritative at each level of the hierarchy.

## Registration and Roles

Saying a name is "bought" is common but misleading. A name is not bought; a **right of
use is leased** for a fixed term. If it is not renewed when the term expires, the name
becomes available again.

Three roles are separated in the process, and confusing them is a common mistake.

| Role | Function |
|---|---|
| Registry | Holds the single authoritative database of registrations under a top-level name |
| Registrar | Mediates between the name owner and the registry, and forwards the registration |
| Registrant | The person or organization holding the right of use for the name |

There is exactly one registry per top-level name; registrars, in contrast, are numerous,
and the name owner chooses among them. A name's registrar can be changed; its registry
cannot, because the registry is part of that top-level name's definition.

The technically meaningful part of a registration is the declaration of which servers
are authoritative for the name. The registry does not hold the address the name itself
corresponds to; it holds only the information "ask these servers for this name's
answers." The content of the answer is under the name owner's control. This distinction
underlies the resolution chain covered in the next lesson.

## Reserved Names

Some top-level names are reserved and will never be opened to actual registration.
`test`, `example`, `invalid` and `localhost` are among them.

This is why this course's examples use the name `example.test`. A reserved name belongs
to no one, does not resolve to an actual server, and will never pass into anyone's
ownership. Using a real name in the examples would make the example wrong the moment
that name's owner changed or its content diverged.

The same reasoning applies to the `192.0.2.0/24` address block used in the previous
lesson: what is reserved for documentation can be used safely in an example.

## Summary

- The name layer lets the value the user knows stay fixed even though the address can
  change; the real reason is not memorability but the ability to break this link.
- A domain name consists of labels and is read right to left, from root to leaves; the
  trailing dot denotes the root and is usually left unwritten.
- The `www` label carries no technical privilege; it sits at the same level as any other
  subdomain.
- Labels are at most 63 characters, full names at most 255; names are
  case-insensitive.
- The function of the hierarchy is to delegate authority: a name owner creates new names
  within its own subtree without asking permission.
- There is exactly one registry per top-level name, and it holds only the identity of
  the authoritative servers; the content of the answer is under the name owner's
  control.

## Next Step

The structure of a name and who owns it have now been established, but how a machine
gets from that name to an address when `example.test` is typed into the address bar has
not yet been said. The answer is not stored in a single place: the query follows a chain
that starts at the root and advances one step at each level where authority has been
delegated. The next lesson covers this chain and the caching scheme that keeps every
request from running it from scratch.
