What is a URL? (Uniform Resource Locator)

Definition & Examples of a URL

Screenshot of a website URL
© Henrik5000 / E+ / Getty Images

Abbreviated as URL, a Uniform Resource Locator is a way of identifying the location of a file on the internet. They're what we use to open not only websites, but also to download images, videos, software programs, and other types of files that are hosted on a server.

Opening a local file on your computer is as simple as double-clicking it, but to open files on remote computers, like web servers, we must use URLs so that our web browser knows where to look.

For example, opening the HTM file that represents this page is done through the link at the top of the browser you're using.

Uniform Resource Locators are most commonly abbreviated as URLs but they're also called website addresses when they refer to URLs that use the HTTP or HTTPS protocol.

URL is usually pronounced with each letter spoken individually (i.e. u - r - l, not earl). It used to be an abbreviation for Universal Resource Locator before being changed to Uniform Resource Locator.

Examples of URLs

You're probably used to entering in URL, like this one for accessing Google's website:

http://www.google.com

The entire address is called the URL. Another example is my site (first) and Microsoft's (second):

http://pcsupport.about.com
https://www.microsoft.com

You can even get super specific and open the direct URL to an image, like this long one that points to Google's logo on Wikipedia's website.

If you open that link you can see that it starts with https:// and has a regular looking URL like the examples above, but then has lots of other text and slashes in order to point you to the exact folder and file where the image resides on the website's server.

The same concept applies when you're accessing a router's login page; the router's IP address is used as the URL in order to open the configuration page.

See this NETGEAR Default Password List to see what I mean.

Most of us are familiar with these types of URLs that we use in a web browser like Firefox or Chrome, but those aren't the only instances where you'll need a URL.

In all of these examples, you're using the HTTP protocol to open the website, which is likely the only one most people encounter, but there are other protocols you could use too, like FTP, TELNET, MAILTO, and RDP. A URL can even point to local files you have on a hard drive. Each protocol may have a unique set of syntax rules in order to reach the destination.

Structure of a URL

A URL can be broken down into different sections, each piece serving a specific purpose when accessing a remote file.

HTTP and FTP URLs are structured the same, as protocol://hostname/fileinfo. For example, accessing an FTP file with its URL might look something like this:

FTP://servername/folder/otherfolder/programdetails.docx

...which, aside from having FTP instead of HTTP, looks like any other URL you might encounter out there on the web.

Let's use the following URL, which is my list of driver updater programs, as an example of an HTTP address and identify each part:

http://pcsupport.about.com/od/driversites/tp/free-driver-updater-tools.htm
  • http is the protocol (like FTP is a protocol) that defines the type of server that you're communicating with.
  • pcsupport is the hostname used to access this specific website.
  • about is the domain name.
  • com is what's referred to as the top-level domain (TDL), some others of which include .net, .org, .co.uk, etc.
  • /od/driversites/tp/ represents the directories used to organize the webpage or file. On the web server that's holding the website files, these would be the actual folders that you'd click through to find the file that this URL is specifying.
  • free-driver-updater-tools.htm is the actual file that the URL is pointing to. If you were trying to load an image, audio file, or other file type instead of an HTM file, then the URL would end in that file extension (like a PNG or MP3).

URL Syntax Rules

Only numbers, letters, and the following characters are allowed in a URL: ()!$-'_*+.

Other characters must be encoded (translated to programming code) in order to be accepted in a URL.

Some URLs have parameters that split the URL away from additional variables. For example, when you do a Google search for pc support:

https://www.google.com/search?q=pc+suppport

...the question mark you see is telling a certain script, hosted on Google's server, that you want to send a specific command to it in order to get custom results.

The specific script that Google uses to execute searches knows that whatever follows the ?q= part of the URL should be identified as the search term, so whatever is typed at that point in the URL is used to search on Google's search engine.

You can see similar behavior in the URL in this YouTube search for best cat videos:

https://www.youtube.com/results?search_query=best+cat+videos

Note: Although spaces are not allowed in a URL, some websites use a + sign, which you can see in both the Google and YouTube examples. Others use the encoded equivalent of a space, which is %20.

URLs that use multiple variables use one or more ampersands after the question mark. You can see the example here for an Amazon.com search for Windows 10:

http://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords=windows+10

The first variable, url, is preceded by the question mark but the next variable, field-keywords, is preceded by an ampersand.

Additional variables would also be preceded by an ampersand.

Parts of a URL are case sensitive - specifically, everything after the domain name (the directories and file name). You can see this for yourself if you capitalize the word "tools" in the example URL from my site that we deconstructed above, making the end of the URL read /free-driver-updater-Tools.htm. Try to open that page here and you can see that it doesn't load because that specific file doesn't exist on the server.​

More Information on URLs

If a URL points you to a file that your web browser can display, like a JPG image, then you don't have to actually download the file to your computer in order to see it. However, for files that aren't normally displayed in the browser, like PDF and DOCX files, and especially EXE files (and many other file types), you'll be prompted to download the file to your computer in order to use it.

URLs provide an easy way for us to access a server's IP address without needing to know what the actual address is. They're like easy-to-remember names for our favorite websites. This translation from a URL to an IP address is what DNS servers are used for.

Some URLs are really long and complex and are best used if you click it as a link or copy/paste it into the browser's address bar. A mistake in a URL could generate a 400-series HTTP status code error, the most common type being a 404 error.

One example can be seen at Dailymotion. If you try to access a page that doesn't exist on their server (like this one), you'll get a 404 error.

These types of errors are so common that you'll often find custom, often humorous, versions of them on some websites. See my 20 Best 404 Error Pages Ever slideshow for some of my personal favorites.

If you're having trouble accessing a website or online file that you think should be loading normally, see How To Troubleshoot an Error in a URL for some helpful ideas on what to do next.

Most URLs don't require the port name to be given. Opening http://www.google.com, for example, can be done by specifying it's port number at the end like http://www.google.com:80 but it isn't necessary. If the website were operating on port 8080 instead, you could replace the port and access the page that way.

By default, FTP sites use port 21, but others may be setup on port 22 or something different. If the FTP site isn't using port 21, you have to specify which one it's using in order to access the server correctly. The same concept applies for any URL that uses a different port than what the program used to access assumes by default that it's using.