📖 Understanding URLs

Web addresses, known as URLs (Uniform Resource Locators), act as the street addresses of the Internet. For example:

https://www.dallascollege.edu/programs/index.html

Using HTTP (HyperText Transfer Protocol), browsers fetch and interpret hypertext files, enabling you to view websites. A common method for transferring files is FTP (File Transfer Protocol), which allows uploading and downloading files without interpreting them as web documents. FTP is the protocol used by developers to manage the web site files.

Think of URLs as unique addresses for resources on the Internet, identifying their exact location. The port, file path, and filename elements are optional in many cases. When these elements are omitted, the server defaults to searching the site's top-level (root) directory for a file that matches its predefined default filenames, such as index.html.

Components of a URL

service:// hostname: port/ directory-path/ filename.ext

Example:
https:// www.dallascollege.edu: 443/ programs/ index.html

service
The protocol used to access the resource, such as HTTP (HyperText Transfer Protocol) or HTTPS for secure communication.
hostname
The domain or server where the resource resides, such as www.dallascollege.edu.
port
An optional communication endpoint. Defaults include 80 for HTTP and 443 for HTTPS.
directory-path
The resource's (optional) location on the server, such as /programs.
filename.ext
The resource's (optional) specific filename on the server, such as index.html.

FTP URLs

FTP (File Transfer Protocol) is a method for transferring files between computers over the Internet. While some browsers support limited functionality for accessing FTP files, such as basic file downloads or viewing directory listings, these tools are not sufficient for developers who need robust administrative capabilities. Browsers often lack features like secure authentication, batch file transfers, or the ability to manage file permissions. For more advanced operations, developers should consider using dedicated FTP clients such as FileZilla or WinSCP. These tools offer extended functionality, including drag-and-drop file uploads, synchronization options, and secure connection protocols like FTPS or SFTP, ensuring better performance and enhanced security. By using a specialized FTP client, developers can efficiently manage files on remote servers and streamline their workflow.

Here's an example:

ftp://ftp.cts.com/pub/wallst

ftp
The protocol used for transferring files.
hostname
The server hosting the files, such as ftp.cts.com.
directory-path
The location of the file or folder on the server, such as /pub/wallst.

Rules for File Names

  1. No spaces! Spaces in URLs are encoded as %20, which can make them less readable. Instead, use hyphens or underscores (e.g., about-us.html).
  2. Use a 3- or 4-letter file extension, such as .html, .jpg, or .png.
  3. Stick to lowercase letters for consistency, as some servers are case-sensitive.
  4. Avoid special characters; use only letters, numbers, underscores (_), hyphens (-), and periods (.).
  5. Keep filenames short and easy to remember.
  6. Always name your home page index.html. This is the default file servers look for if no filename is specified.

References

MDN: What is a URL?

GCF Global: Understanding URLs