The Anatomy of Internet URLs

How do internet addresses work?

Woman laying on white rug using laptop

 Dougal Waters / Getty Images

Uniform Resource Locators (URLs) are an easy way to reach resources on the internet. You'll find URLs on websites via hyperlinks, on search engines, behind QR codes, and other places.

These internet addresses a lot like the physical addresses we use to explain where we live in the world, but instead of a physical location, the URL points to a resource such as a web server.

Some examples of how a URL can appear are as follows:

  • telnet://
  • gopher://
  • telnet://

Perhaps those strings of characters seem cryptic, but outside of the strange abbreviations, URLs are really no more cryptic than an international long-distance telephone number.

Facts About URLs

Remember these key items about URLs:

  • A URL never has any spaces in it. Internet addressing does not like spaces; if it finds spaces, your computer will sometimes replace each space with the three characters %20 as a substitute.
  • For the most part, a URL is usually all lowercase. Uppercasing generally makes no difference in how the URL works.
  • A URL is not the same as an email address.
  • URLs always starts with a protocol prefix, like http:// or https://. Most browsers type those characters for you. Other protocol examples include ftp://, gopher://, telnet://, and irc://.
  • URLs are easier to remember for accessing a website than memorizing the site's IP address.
  • Forward slashes (/) and dots are used to separate a URL's parts.
  • A URL is usually in some kind of English, but numbers are also allowed.

How to Understand a URL

URLs are broken down into just a few parts: protocol://hostname/fileinfo. These components can be found in every URL you use, including the ones listed above.

Here's a very simple example:

For this one, the JPG image is in a folder called vacation, which is actually a subfolder in images. The images folder is at the root of this web server.

Also consider this URL, which is a little more complicated: 

The part before the slashes shows that the URL points to an FTP server. Following that is the hostname The public page you'll access with this specific URL is on the ftp subdomain.

Some URLs aren't as easily understood, however. For example, a simple version might be a page as shown below, which explains that the URL points to the page HTML file on that web server:

However, some web servers are designed to hide some of the information for security, visual, or management reasons, so it could look like this but still take you to that same page.html file:

The final example shows the URL for a video on YouTube. However, unlike the regular one you might see, which consists of 40 or so characters, the true location of the video could be as long as 650 characters because of various temporary data and hidden information:

See What Is a URL? to learn more about what each part of a URL means.

Why the Structure of a URL Matters

One good reason to know how a URL works is for troubleshooting purposes. If you can't access a specific website and you instead get an HTTP error, you can perhaps try some things to "fix" the URL.

For example, if you find that the URL doesn't show you the information you're after, you can take apart the URL piece by piece to identify what might be wrong.

Screenshot of a URL error on
Jon Fisher

In this example, you'd start at the very beginning and try accessing only parts of the URL until you find the problem.

  1. Check if works.

    If it doesn't, the problem might not be yours to fix; rather, the site itself could be down, which means you're waiting for the owner of that site to resolve the issue. If you can't get to the home page, you'll likely find that no other page on that domain works either.

  2. Does load anything?

    Some websites don't let you browse "middle" directories like this, so you might be redirected to the primary domain if you try accessing a location like this.

  3. What happens when you add the last section, watchos-15?

In these steps, we can see that the first two attempts worked just fine, and it wasn't until we tried accessing the specific "watchos-15" page that the error was shown. The error message indicates that the website is still working but that the specific page you were looking for is dead or has redirected elsewhere.

Knowing that the URL is separated into parts is helpful in narrowing down where the problem lies. If it's with the domain (the first part in Step 1), then the site itself is having issues, not just the page you wanted to access. However, if the particular page you're wanting to open is the only problem, you might be able to find it elsewhere on that site. If not, it's likely that they've deleted that page and it's no longer accessible.