Web Authoring: Basic URLs

Basic URL Structure


URLs (Uniform Resource Locators) are the foundation of hypertext for the World-Wide Web. A URL specifies the resource that a link "points to." It tells you everything you need to know about the resource in order to get to it (if it doesn't, you don't get the resource).

Parts

A URL has three basic parts: the protocol (how to get the resource); the server id (who to get the resource from); and the resource id (the name of the resource and how to find it on the target machine). In its most basic form, this looks like the following:

http://www.fake.com/doc.html

The "http" indicates that this is a Web document. The "www.fake.com" is the domain name of the (in this case, fictional) machine on which the web server is running (we know it's a web server because of the protocol). And, of course, "doc.html" is the filename of the HTML document (notice the file extension ".html") on that machine.

Each of these parts can become more elaborate, if necessary. For example, if the web server were running on a nonstandard port, this information would have to be included in the server id portion of the URL:

http://www.fake.com:8080/doc.html

(It is also possible to provide authentication--userid and password information--if this is required. However, since this information is not transmitted in a secure way, this is not recommended.)

In both of the preceding cases, the file was located in the "default" directory of the web server (this is the place the web server looks for documents if no particular location is specified). It is important to realize that this may not be (in fact, probably isn't) the same as the "home" or "root" directory on the server machine. If the file is located somewhere other than the default directory, this needs to be specified:

http://www.fake.com/topdir/subdir/doc.html

Protocols

The following list gives some of the types of URLs that are possible:
 Agenda  Next  Prior
SDR, 11 Jun 1995.