What is a URL and how can you change one?

When you browse the web, you constantly use URLs. Whether you’re following a link, clicking a bookmark, or typing a website address into your browser, there’s a URL at the heart of it all. But what is a URL — and how do you modify one?

What does this acronym stand for?

A screenshot of a web browser, highlighting the address bar, at the top, which displays the URL of the current page

First, you’re right to recognize that “URL” is an acronym, but the full version won’t necessarily help explain things; URL stands for “Uniform Resource Locator”. In a simplified sense, this phrase simply means “address” and that is exactly what a URL is: the address of a web page.

In general, a URL can be separated into five sections, each more specific than the last. It’s much like street addresses in much of the western world, except in reverse order. By the end of this article, you will know what each of these parts are for and will be able to understand any URL you come across on a deeper level than before.

An example URL separated into its five individual parts: protocol, host, path, request, and fragment ID

The protocol: what to do with this URL?

An example URL—https://www.apple.com—with protocol—"https"-Underline

Most URLs you will come across will be used to identify individual websites or web pages, but URLs can actually be used in other contexts. the protocol helps set this very broad context from the start.

The standard protocol used to refer to websites is HTTP, but other common protocols include “mailto” (for email), “file” (for local file system access), and FTP (for file transfer). of files).

There is another protocol you have come across: HTTPS. As you might guess, it’s a close cousin to the standard HTTP protocol, but that URL prefix indicates it’s a “secure” version. Essentially this means that your use of such a URL is more private than the standard HTTP alternative – you will often see such a URL accompanied by a padlock icon in your browser’s address bar, which may even obscure the protocol completely.


Some browsers offer their own unique custom protocols, such as in Chrome’s preferences page URL, “chrome://settings/”.

Experiment with addresses

Try typing “to file:///” in your browser’s address bar to view files on your own computer. If you are viewing an unsecured web page (such as http://apache.org) try changing the URL to show the secure version instead (e.g. https://apache.org). Many sites will automatically redirect you from their standard version to the secure equivalent.

The host: an address for the entire site

An example URL—https://www.amazon.com—with host—"www.amazon.com"-Underline

The host (similar to, but not necessarily exactly the same as, hostname or domain) is what identifies a specific “website”. It’s made up of a series of dot-separated parts, and that’s often all you need to type to get to the homepage for a given company or product.

The order of the parts in the domain is the reverse order of the global URL, i.e. it starts specific and gets more general as it goes. In the example, “www” is the most specific bit, then comes a more general “amazon” bit, then finally the “top-level-domain” such as “com”.

Read more: What do URL domain extensions mean and why are they needed?

Experiment with URLs

One of the most useful changes you can make to a domain is to change the end levels that reference your location. This can be just the top-level domain, or possibly the previous part as well.

For example, this book on amazon.com (the US site):


can be viewed on Amazon Germany by replacing the “com” with “de”, which gives:


The path: an address for a specific page

An example URL—https://www.makeuseof.com/category/technology-explained—with path—"/category/technology-explained"-Underline

The path identifies a specific page on the website URL. While the host started out specific and got more general as we read from left to right, the path is exactly the other way around: it starts “most general” and becomes “more specific ” because it specifies the exact location of the final. page. It’s similar to how you address files on a computer because, in the simplest case, it’s exactly that.

Experiment with paths

There are no guarantees, but websites – usually the best organized ones – will often structure their paths so that they can be navigated by manual editing. For example, if you look at this URL:


you can try removing the last part of the path to navigate “up” one level:


The request: URL parameters

An example URL—https://www.youtube.com/watch?v=yh5MEDKrwqI&t=200s—with the query—"?v=yh5MEDKrwqI&t=200s"-Underline

When a resource is more complicated than just a basic page, enter the “query string”, a collection of URL parameters which are usually name/value pairs, each separated by an “&”.

Each site (in fact, each page of a website) is completely free to decide how it handles URL parameters, including their names. In the YouTube example, “v” refers to a specific video and “t” refers to a time to start playing the video.

Experiment with parameters

URL parameters offer perhaps the most flexibility for URL “hacking”! For example, the “t” parameter of the YouTube URL is quite flexible; instead of seconds, it can represent minutes:


or it can combine the two:


A fragment identifier: point in a page

An example URL—https://en.wikipedia.org/wiki/URL#History—with fragment id—"#Story"-Underline

Another piece of highly technical jargon that describes a simple concept, a “fragment identifier” is the most specific part of the URL, addressing an individual part of the page.

It will only be available if the underlying page supports it, but Wikipedia is a good example of how this is done.

The links in the Content section of the Wikipedia URL above all navigate to the same page, they just use different fragment IDs to target different points.

Experiment with identifiers

Often the first thing to do is simply remove the fragment’s identifier; it’s not harmful at all, it will just convert a “point specific” url to a default url at the top of the page. You may need to do this if you clicked on a “content” link, but want to send someone the URL to the top of the page. To do this, start with the full URL:


then just remove the fragment id:


And it’s a URL!

You now know all about the anatomy of a URL, from protocol to fragment identifier. URLs start out general and become more specific as you read them from left to right. Once you understand how each part works, you can edit a URL to make useful changes.

Another specific area that offers more information is domain extension.

Image Credit: Chris Dlugosz/Flickr

dot com
What do URL domain extensions mean and why are they needed?

The Internet is not limited to .com, .org and .net sites. The world of top-level domains exploded a few years ago. But what is a TLD? Let’s find out.

Read more

About the Author

Comments are closed.