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:
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:
(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:
Protocols
The following list gives some of the types of URLs that are possible:
- http:
This is a link to a web document.
- ftp:
This is a link to an anonymous ftp site.
- gopher:
This is a link to a gopher site.
- telnet:
This will open a terminal session.
- mailto:
This will permit you to send electronic mail (Note: several
browsers, such as Mosaic, do not support "mailto" URLs.)
- news:
This will let you read a Usenet newsgroup. (You must have configured
a local newsreader; some browsers will not permit you to post.)
- wais:
This will initiate a WAIS search.
- file:
This will link to a local file (i.e., one on the same machine
as the browser, not the same machine as the server.)
SDR, 11 Jun 1995.