URLs: Addresses for the Internet

On the page How the Internet works, I wrote:

The Internet is millions of computers, all connected together.

And on the page What is a website?, I wrote:

When you view a simple website, such as this one, you’re really reading a file stored on a computer.

So how can you find the specific file you’re looking for on just one of those millions of computers? Fortunately, every file on the Internet has an address. These addresses are called Uniform Resource Locators, or URLs.

A physical address subdivides the physical worls into a series of steps – Country, State, City, Street, and House Number – to make it easier for people to find it. Similarly, a URL subdivides the internet into a series of steps to make it easy for you to find a specific file on a specific computer.

Structure of URLs
Structure of URLs, courtesy of Wikipedia
  • The main organizing unit of internet addresses is the domain. Examples of a domain are google.com, wikipedia.org, whitehouse.gov, etc. A single domain is usually controlled by a single person or company, and it may have many pages contained within it.
    • Each domain name also includes a top-level domain (TLD), such as .com, .org, .gov, and more.
  • Some domains may be organized into subdomains. A subdomain appears to the left of the domain, and is typically used to split up a domain. For example, Wikipedia has English site at en.wikipedia.org and a French site at fr.wikipedia.org.
  • Within a domain or a subdomain, there could be thousands of individual web pages or files, with each file given its own unique path. After the domain and TLD, there will be a slash (/). Anything after the slash is the path of the web page.
  • Occasionally, the path may include a hash mark (#). This is called an anchor; anchors provide a way of naming not just a file, but specific parts within that file.

How does a paricular domain get matched to a particular set of computers and files? That’s a complicated question that I won’t cover in detail here. The short answer is that it’s the responsibility of the Domain Name System (DNS). If you want to learn about about DNS, see this article from DNS provider VeriSign.