WWW FAQs: What is a URL?

2003-09-04: look up at the top of this web page. Above the page you will see the "location bar" of your web browser, which should contain something very like this:


This is the Uniform Resource Locator (URL) of the web page you are looking at right now. A URL can be thought of as the "address" of a web page and is sometimes referred to informally as a "web address."

URLs are used to write links linking one page to another; for an example, see the HTML entry.

A URL is made up of several parts. The first part is the protocol, which tells the web browser what sort of server it will be talking to in order to fetch the URL. In this example, the protocol is http.

The remaining parts vary depending on the protocol, but the vast majority of URLs you will encounter use the http protocol; exceptions include file URLs, which link to local files on your own hard drive, ftp URLs, which work just like http URLs but link to things on FTP servers rather than web servers, and mailto URLs, which can be used to invite a user to write an email message to a particular email address.

The second part of the example URL above is the fully qualified domain name of the website to connect to. In this case, the fully qualified domain name is www.boutell.com. This name identifies the web site containing the page. The term "fully qualified domain name" refers to a complete website or other computer's name on the Internet. The term "domain name" usually refers only to the last part of the name, in this case boutell.com, which has been registered for that particular company's exclusive use. For more information about registering domain names, see the setting up websites entry.

The third part of the example URL is the path at which this particular web page is located on the web server. In this case, the path is /newfaq/basic/url.html. Similar to a filename, a path usually indicates where the web page is located within the web space of the website; in this case it is located in the basic sub-folder of the newfaq folder, which is located in the top-level web page directory of our website.

For more information, see a beginner's guide to URLs, as well as my article what is my URL?

Legal Note: yes, you may use sample HTML, Javascript, PHP and other code presented above in your own projects. You may not reproduce large portions of the text of the article without our express permission.

Got a LiveJournal account? Keep up with the latest articles in this FAQ by adding our syndicated feed to your friends list!