What is a URL?
URL is an abbreviation for Uniform Resource Locator. It is the method or technique by which information is obtained.
Know Your Type!
There are different types of URLs.
http:// or absolute URL
This is the most common URL you will see. Often referred to as a link, absolute URLs are the location or address of information on a computer or server other than your own.
File or relative URL
This links to local files on a localhost, which is just a fancy name for your own hard drive.
FTP URLs work just like absolute URLs, but link to things on FTP servers rather than web servers.
Mail To URLs
Mail to URLs are used to invite a user to write an email message to a particular email address. Mail to URLs automatically launch the email client on the user’s computer. If no mail client is configured, nothing will launch.
The protocol tells the web browser what sort of server it will be talking to in order to locate the URL. A URL that actually contains a locator, or prefix, such as http:// is an absolute URL. This will signal to your browser that the web page is located at another server. Browsers will typically auto-populate that prefix for the user.
The Domain Name
The second part of a URL is the fully qualified domain name of the website to connect to. This identifies the website containing the page. The term “domain name” usually refers only to the last part of the name. Domain names must be registered for use from a registrant such as GoDaddy.com.
The path indicates to the server where a particular web page is located. Like a filename, a path usually indicates where the web page is located within the server space of the website.
How’s it all come together?
A relative URL makes use of the fact that the information is stored on the current server and makes use of the directory structure of the web via pathnames. In other words, the information consists of only the pathnames of the files. The protocol here is implied to the server. There is no http:// specified. The server knows how to interpret the URL. The URL given would be relative to the directory the page is in. This allows for the development and testing of your pages offline. It also makes the copying and/or moving of your web pages a fairly simple task.
Whenever any URL ends in a directory name, the web server will generally look in that directory for a file called index.html or *.htm or *.php depending on what the server and/or web page is configured in. When found, that file is sent and interpreted by the browser. This index.* file can be, and sometimes is, considered the home page.