What is a URL?

Share this...
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

The Uniform Resource Locator

Have you found yourself wondering what is a URL exactly? Are you curious about the punctuation marks that appear in some web addresses? Well ponder no more. Today I am going to briefly cover the basic parts of a URL and help you identify them on any URL so that you can exactly define what a URL is. 

Parts of a URL

The Hostname

One of the key parts of a URL is the domain name. A domain name is a human readable string of characters which points to your web server. This spares your users from having to enter the numeric IP address of your server to get to your site.

The domain name acts as a common name for your server. As an example, imagine telling a taxi driver to take you to the Washington Monument. You would still end up at the monument, but you didn't have to tell the driver to take you to 2 15th St NW, Washington, DC 20024.

To review, a domain name translates into in IP address which tells your computer where the server and therefore your site live.

Protocols in a URL

In order for your web browser to understand and communicate with the server, they both need to agree on a set of rules to follow. This is what is known as a protocol. One of the protocols you may be most familiar with is the Hyper Text Transfer Protocol or HTTP.

This protocol is used to retrieve web pages from a web server and is one of the key protocols that make the Internet what it is today.

In a URL the protocol is found to the left of the domain. The :// token is used to delimit the protocol.

The protocol tells your machine which method to use to fetch the data. Common protocols include ftp:// http:// and https:// however it should be noted that not every protocol is meant to be used with a browser.

For example, FTP (ftp://) is the file transfer protocol and is used for transferring files to and from a server. Your browser does not understand how to connect via the FTP protocol.

In this case a file transfer program is used which understands the FTP protocol. In this case the protocol would tell your computer to connect to port 21 on the server (default FTP port).

File Paths in a URL

Now lets move to the other end of the URL.

Files on web servers are often organized into directories, or folders. This is indicated in the URL as well.

The part to the right of the first slash specifies a location on the servers. This is representative of a folder hierarchy pointing to a specific file.

In the URL shown above, the file 'clouds.jpg' resides in the 'uploads' directory.

URL Parameters

After the file in the URL there may be a ? This indicates the start of parameters.

Parameters are key and value pairs separated by &.


In this case the parameters being passed along with the request are post=804 and action=edit. The server can use a server side scripting language such as PHP and take certain actions depending on what parameters are passed.

What is the difference between a URL and a URI?

The answer to this question usually varies depending on who you ask. The fact is that URI, and URL are often used interchangeably.

URI stands for Uniform Resource Identifier, while URL stands for Uniform Resource Locator.

A URL is actually a type of URI. By including the protocol such as http:// you are giving your browser complete instructions to locate that resource. This is what makes a URI become a URL.

A URI describes an object and where it is located, but does not include instructions for how to successfully retrieve it.

Now there's some trivia you can bust out at the next cocktail party.


In all we've learned about the importance of each component of a URL, and even the slight differences between a URL and a URI. Understanding these core principles makes web hosting easier. The URL includes a protocol, which tells the browser how to retrieve a resource. It also includes the domain name which indicates which server the browser should contact, and finally it includes a file to request at a location on that server.

Now the next time you are in a job interview and they ask you 'what is a URL?' you'll be able to tell them exactly what it is, and how it is different from a URI. 

Start serving up your web pages today? Get your $12.99 .COM today!

Share this...
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *