URL format
When you try to access a webpage on the internet, the web address you put into the browser has a certain format. In its entirety (including the http:// part), this web address is known as a URL.
This tutorial focuses on:
- URL definition and construction
- Common protocols and their usage
URL definition and construction
URL stands for Uniform Resource Locator. A Uniform Resource Locator takes on a certain format through which you can create connections and/or access information using various protocols. A URL is the global address for a document or resource on the internet.
Parts of the URL explained:
- protocol - Indicatates what protocol will be used to access the URL. Some common protocols include HTTP(Hyper Text Transfer Protocol) for transferring web content and FTP(File Transfer Protocol) for transferring files over a remote connection. The protocol is followed by ://
- domain or IP address - Specifies an IP address or domain where the resource is located such as www.landofcode.com or 10.1.1.1
- port - Specifies the port to use for the connection. It is usally omitted, as default ports are used for various protocols such as port 80 for HTTP.
- path - Specifies a subdirectory at the server where the resource is located. If the path is omitted, then the root directory at the server is checked for the resource.
- filename - The actual name of the resource. If the filename is omitted, then a default filename is used such as index.html for an HTTP connection.
Common protocols and their usage
| Protocol | Usage |
|---|---|
| http | Access a file on the world wide web |
| https | Access a file on the world wide web through a secure connection |
| file | Access a file on the local computer |
| ftp | Access a file on an FTP server |
| gopher | Access a file on a gopher server |
| news | Access a Usenet newsgroup |
| telnet | Start a telnet connection |
| mailto | Create a link to an email message from a webpage |
| WAIS | Access a file on a WAIS server |
HTTP
The URL type most internet users are used to. The standard HTTP webpage access URL.
HTTPS
Seen across online stores for data security reasons, the HTTPS protocol will secure data as its in transmission.
FTP
The FTP protocol is commonly used by webmasters to access the files on their webservers.
Usenet News
The Usenet News contains many discussion groups you can subscribe to.
Mailto
Mailto provides a link to an email message from a webpage
File
You can actually access your computer's file directory through a browser using File.