URL

From USApedia
URL on Wikipedia

A URL (Uniform Resource Locator) is a reference or address used to access resources on the internet. URLs are fundamental to the World Wide Web, allowing users to navigate to websites, download files, send emails, and more by providing a standardized way to locate resources across the internet.

Format

  1. Scheme: This tells the web client (like a browser) how to access the resource. Common schemes include:
    • http - Hypertext Transfer Protocol (non-secure)
    • https - HTTP Secure, which means the communication is encrypted
    • ftp - File Transfer Protocol
    • mailto - for email addresses
  2. Host: This part identifies the server where the resource is located. It can be:
    • A domain name (e.g., example.com)
    • An IP address (e.g., 192.0.2.1)
  3. Port: Optionally, after the host, there might be a colon followed by a port number. If not specified, it defaults to 80 for HTTP and 443 for HTTPS.
  4. Path: This specifies the location of the resource on the server. It looks like a directory path or file path, e.g., /path/to/resource.
  5. Query: After the path, there might be a question mark ? followed by query parameters. These are key-value pairs that provide additional data to the server, like search terms or parameters for dynamic content, e.g., ?search=URL.
  6. Fragment: An optional part, preceded by a hash symbol #. It specifies a location within the resource itself, like a section in an HTML document, e.g., #section2.

Related