URLs, domain names and registrars

Why:You’ll read any address part by part and choose a name for your project. Afterwards you’ll know how a scheme differs from a host and a path, what a top-level domain such as .com is, and what a registrar does.

20 minutes

Read by speech synthesis (Qwen3-TTS); the voice is not a person’s.

A URL is a page’s address in parts: scheme, host, port, path, query and fragment. The host is a domain name, read right to left and rented from a registrar.

An address like one on an envelope

For a letter to arrive, you write the country, the town, the street and the house on the envelope. For a page to be found, it has an address, a URL (Uniform Resource Locator). It is also read in parts, from the general to the particular. Take this address:

https://www.example.com:443/services/surveying?city=riverbend#price
  • Scheme (https): how to talk to the server. http is the plain protocol, and https is the secure one.
  • Host (www.example.com): whose server it is. The computer uses the host to find where to go (in the next lesson we’ll see how).
  • Port (443): which program on the server gets the request. It is usually not written: https implies 443, and http implies 80.
  • Path (/services/surveying): what exactly you are requesting on this server. It looks like a path to a file in folders.
  • Query (?city=riverbend): a refinement in the form of “name=value” pairs. This is how search and filters work.
  • Fragment (#price): a place inside the page. It is not sent to the server: the browser handles it and scrolls the page to the right place.

Type any address into the diagram below, and it will split it into parts. Nothing is sent: the parsing happens in your browser.

What an address is made of

https://www.example.com/services/surveying?city=riverbend#price

Scheme
https How to talk to the server: http, https.
Host
www.example.com Whose server it is. The host is what is looked up in DNS.
Port
443 (the default, not written in the address) Which program on the server gets the request.
Path
/services/surveying What exactly is requested on this server.
Query
?city=riverbend A refinement of the request: “name=value” pairs after the question mark.
Fragment
#price A place inside the page. It is not sent to the server: the browser handles it.
The host is read from right to left
  1. .com top-level domain (TLD)
  2. example the domain name (the one you register)
  3. www subdomain (you create it yourself)

For a name with letters outside the basic Latin alphabet (such as bücher.de), the browser writes it in a special Latin form (punycode, which starts with “xn--”): that is how the network understands it.

Check yourself: which part of an address is not sent to the server?

The fragment (what comes after the hash sign). Only the browser uses it.

A domain name is read right to left

The host www.example.com is a domain name. It is built like a tree, and you read it from the end:

  1. com: the top-level domain (TLD). This is what the rightmost part of a name is called.
  2. example: the domain name. This is what you register.
  3. www: a subdomain. The owner creates it, free of charge, as many as they like: blog.example.com, shop.example.com. Even “www” is just a subdomain, left over by habit from the days of the first sites.

Zones come in two kinds. Country-code zones: .uk, .de, .ca, .ru, which are the zones of countries. And generic ones: .com, .org, .net, and a great many newer ones such as .online and .shop. The whole system is coordinated by ICANN, which accredits the registrars for the generic zones, and the list of every zone is kept by IANA. Both have links in the sources. Each country-code zone is run by a registry of its own, with rules of its own.

Some zones take names in other alphabets. Russia’s .рф zone, for example, accepts Cyrillic names such as пример.рф. For the network such a name is written in Latin letters by a special scheme called punycode: xn--e1afmkfd.xn--p1ai. The browser does this itself, and you only see it when you copy the address.

Check yourself: how is blog.example.com read, and what is what in it?

From the right: com is the zone, example is the domain name, blog is the subdomain.

Who manages the names

This system has three players:

  • The registry runs a whole zone: it remembers which names in it are taken and by whom. For .com it is Verisign, for .uk it is Nominet.
  • The registrar is the company you order a name from. It deals with the registry on your behalf. There are many registrars, and they compete on price and service.
  • The registrant is you: the one who rents the name.

The word “rents” matters here. A domain isn’t bought for good. It is registered usually for a year and renewed. If you don’t renew in time, the name becomes free, and someone else can take it, along with your address and every link to it. So turn on auto-renewal, keep access to the registrar’s account and watch for its emails: reminders will arrive in your inbox.

Don’t confuse a domain with hosting. A domain is the name on the envelope. Hosting is the place where the site’s files live. They can be kept with different companies, and that is normal. We’ll cover hosting in the part on infrastructure.

Check yourself: what happens if you don’t renew a domain in time?

The name becomes free, and someone else can take it, along with your address.

How to choose a name

A good name for a site is:

  • short and easy to say aloud, so it can be dictated over the phone;
  • free of hyphens and digits if possible: they have to be explained (“hyphen”, “seven” or “7”?);
  • in a zone familiar to the audience: .com for an international project, or the country zone for a project that people look for in one country;
  • not a copy of someone else’s brand: otherwise you may get a letter from the brand’s owner;
  • permanent: an address is remembered and placed in links, and changing it later hurts.

Spelling is a problem too: one name can be written in several ways, and people will get it wrong. So a spare name with another spelling is useful.

Page paths

A path is also part of your interface. A good path is:

  • short and readable: /services/surveying, not /page?id=7384&x=1;
  • in plain Latin letters, because spaces and symbols in an address turn into a long run of codes like %20 when copied;
  • without spaces or capitals, with words joined by hyphens;
  • stable: Tim Berners-Lee wrote an article, “Cool URIs don’t change”: a good address shouldn’t change. If a page is moved anyway, the old address should be redirected to the new one (we’ll do that in the lesson on HTTP).

If a site has several languages, tell them apart in the address: by a subfolder (/en/, /fr/) or a subdomain (fr.example.com). Choose one way and stick to it. There is more about multilingual sites in the part on search and in the part on HTML.

Practice

Choose a name and the addresses of the sections for your project and write them in the note. The names of the sections are already on the page: you need to invent a Latin path for each. If the site is in two languages, add the language to the paths: /en/services and /fr/services.

What was wrong with the addresses of the 1990s

The first addresses were long and arbitrary: ~username/pages/index.html, through home directories on university servers. Later came dynamic addresses of the form index.php?id=4, which no one can remember. The readable addresses we are used to today are thanks to people beginning to think of an address as part of the interface.

Practice

Preparing your page…

Test

Question 1 of 6

Put the parts of the address in the order they come in it: https://www.example.com:443/services?city=a#price

Put them in order with the “up” and “down” buttons.

Cards

These cards go into your review once you finish the lesson.

  • What is a URL made of?

    Answer

    Scheme, host, port, path, query and fragment: https://host:port/path?query#fragment.

  • Where does the fragment (#…) of an address go?

    Answer

    Nowhere: it isn’t sent to the server. The browser uses it to scroll the page to the right place.

  • In what order is a domain name read?

    Answer

    Right to left: the zone (.com), the domain name (example), the subdomain (blog).

  • What does a domain registrar do?

    Answer

    It enters your name in the zone’s registry and renews it. A domain is rented, usually for a year, so it must be renewed.

  • How does a domain differ from hosting?

    Answer

    A domain is the name, and hosting is the place where the site’s files live. They can be kept with different companies.

Sources

Next

You now know: the anatomy of a URL, domain names and registrars.