[Index] [Up] [Back] [Next]

5. Uniform Resource Locators (URLs)

URLs, or Uniform Resource Locators, are the method by which documents or data are addressed in the World Wide Web. The URL contains the following information: URLs are more sophisticated than this brief introduction would imply. For more detail have a look at the URL overview document, found at CERN.

5.0 Structure of an URL

    http://www.address.edu:1234/path/subdir/file.ext
|        |                |    |                    |
|service |                |    |                    |
         |____ host ______|    |                    |
                          |    |                    |
                          |port|                    |
                               |      file and      |
                               |_ resource details _|

5.0.2 Service

The first part is the service specifier, (here HTTP service) which specifies the access method. Specifically this is the part before the colon. Some examples of services are: http, gopher, wais and ftp.

5.0.3 Address and Port number

The second part is usually the internet address of the server, indicated by the double forward slash (//). This address can also contain the (optional) port number the service listens at. The full name is then specified by a string like //www.address.edu:1234, where :1234 means Port number 1234. if you want to use the default port number you leave out the colon and the number.

5.0.4 Resource Location

The forward slash after the host and port specifications indicates the end of the address and the beginning of the specification for the file/resource to be accessed. This field varies depending on the service being accessed. A few simple examples follow: more detailed ones are given in the documents listed below.

5.0.5 Special Cases

In some cases the internet address and resource location are omitted. The common examples of this are news (for accessing Usenet news group information) and mailto (for sending mail).


5.0.6 Some Simple Examples

http://info.cern.ch/hypertext/WWW/Addressing/URL/Overview.html
Retrieve the named HTML document from the CERN http server running on the default port.
gopher://gumby.brain.headache.edu:151/7fonebook.txt
Access the searchable index 'fonebook.txt' from the named gopher server, running on port number 151.
news:alt.rec.motorcycle
Access the newsgroup alt.rec.motorcycle.
For more detailed information on the different URL formats see:

[Index] [Up] [Back] [Next]