URLs Explained

How do I refer to information on the Web?

When you send someone a postcard, all you need to know is their street address. When you want to view a file on your hard drive, all you need to know is its pathname. When you want to view information on the Web, you must know its Uniform Resource Locator (URL). URLs provide a compact notation for describing resources all over the Internet.

The Internet is not so mysterious

All interactions use a common protocol (TCP/IP) which requires a hostname, service specification and some parameters. For example:
ftp explorer.arc.nasa.gov		service, host
cd pub/space/GIFS			parameters
get shuttle1.gif

telnet downwind.sprl.umich.edu 3000	service, host (no parms)
A Uniform Resource Locator (URL) is simply a compact way to represent the same information:
ftp://explorer.arc.nasa.gov/pub/space/GIFS/shuttle1.gif
telnet://downwind.sprl.umich.edu:3000/

file://explorer.arc.nasa.gov/pub/space/GIFS/shuttle1.gif
wais://gourd.srv.cs.cmu.edu:6000/bovik?
gopher://olt.et.tudelft.nl:1251/11/space
news:sci.space.science
http://delcano.mit.edu/cgi-bin/midr-query

Anything with slashes, colons, and dots is probably a URL

But spaces are not allowed! Use a plus sign (+) instead of a space. The general syntax of a URL is (more detail is available):
	URL  ::=  service://host/parameters

	service  ::=  ftp, file, telnet, wais, gopher, news, http
	host  ::=  Internet address [ : port ]
		|  user [ . passwd ] @ Internet address [ : port ]
		|  localhost			(empty hostname implies localhost)
	parameters can be ftp://host/filename
		       |  file://host/filename
		       |  telnet://host/
		       |  wais://host/keyword [ ?keyword ... ]
		       |  gopher://host/menu_item [ / menu_item ... ]
		       |  news:newsgroup
		       |  http://host/filename
		       |  http://host/cgi-bin/program/params
		       |  http://host/formname [ ? param ... ]

For the gory details check the TCP RFC's, /etc/services file, and Bennet Yee's faucet program from his gms.tar.Z software. You can play with these protocols directly (outside of mosaic) using the telnet host service command on a unix system.
Carnegie Mellon Computer Science mwm@cs.cmu.edu
Next, Up, Prev,