Contents Introduction Updates 1 2 3 4 5 6 7 8 A B C D E F G H I J K Glossary

Appendix B: What's a URL?

A URL (Uniform Resource Locator) describes the location of a web page, image, sound, or any other document on the World Wide Web. It is sometimes called the web address of a document (see Appendix G for how to create links using a URL). URL's can describe a document's location in two ways:

As an absolute or inclusive location (Absolute URL)
Relative to the current location (Relative URL)

An absolute URL has the form (Things in parentheses are optional and if omitted, default values are assumed.):

protocol://serverName(:port)/directory/(documentName)

Example:

http://www.yahoo.com/Internet/Providers/index.html

Divided up into its parts it looks like:
Protocol (how information is exchanged): http
Web Server Name: www.yahoo.com
Port (server connection number): DEFAULT VALUE
Directory: /Internet/Providers/
Document Name: index.html

When making links on a web page, certain parts of the URL may be omitted. When omitted they are assumed to be the same as the current page (where the clickable link appears). A URL with omitted parts is called a Relative URL.

Examples (based on links in index.html shown in figure to the right):

Here are some examples of URL's and their associated parts:

Absolute URL's

URL Protocol Server Port Directory Document
http://www.hccweb.com/
http www.hccweb.com DEFAULT / DEFAULT
http://www.yahoo.com/Internet/Providers/list.html
http www.yahoo.com DEFAULT /Internet/Providers/ list.html
http://www.hccweb.com:81/library/index.html
http www.hccweb.com 81 /library/ index.html

Relative URL's

(CURRENT indicates values from current document and do not need to be entered as part of the URL)
URL Protocol Server Port Directory Document
/community/index.html CURRENT CURRENT CURRENT /community/ index.html
/manual/ CURRENT CURRENT CURRENT /manual/ DEFAULT
myDoc.html CURRENT CURRENT CURRENT CURRENT myDoc.html

If the URL's in the above table were the target of hotlinks on the web page

      http://www.hccweb.com/library/index.html
the resulting absolute URL's would be (respectively):

[Previous] [Contents] [Next]


Document: /manual/hccmanB.html
Last Modified: Friday, 24-Jul-1998 11:37:36 CDT
Copyright © 1997, 1998 Infobahn Outfitters, Inc.