ComputerGeek
search
What Is a URL? (Uniform Resource Locator) Updated: Feb. 28 2026 | Created: Feb. 28 2026

What Is a URL? (Uniform Resource Locator)

A Uniform Resource Locator (URL) is the complete web address used to locate and access resources on the internet. A URL tells your browser exactly where a resource is located and how to retrieve it.

Resources can include web pages, images, videos, downloadable files, APIs, and more. In simple terms, a URL is the web address you type in your browser’s address bar to visit a website or open a specific page.

Quick Definition: A URL (Uniform Resource Locator) is the address used to access a specific resource on the internet.

Why Are URLs Important?

URLs are essential because they provide a precise way to locate and access resources on a network. Think of a URL like a home address. Without it, browsers would not know where to send requests, and users would not know how to find websites or specific pages.

URLs also:

Types of URLs

URLs can be categorized in different ways depending on their location, structure, or protocol.

1. Based on Location

2. Based on Structure

3. Based on Protocol

Parts of a URL

A URL is made up of several components. Understanding each part is key to navigating and building the web.

Parts of a URL

1. Protocol (Scheme)

Defines the rules for transferring data between the browser and server. Examples: https, http, ftp, mailto, file

2. Subdomain

Organizes different sections of a website, appearing before the main domain.

Examples:

3. Domain

The main website name that acts as a human-readable version of an IP address.

Examples:

4. Path

Specifies a specific file or location on the server.

Examples:

5. Query Parameters

Start with a question mark (?) and pass data to the server as key-value pairs.

Examples:

6. Fragment

Starts with a hash (#) and points to a specific section of a webpage.

Examples:

URL vs URI vs URN

In short: All URLs are URIs, but not all URIs are URLs.

Absolute URL vs Relative URL

Absolute URL

A complete address including protocol and domain. Example: https://computergeek.dev/what-is-a-url

Relative URL

A partial address depending on the current page’s location. Example: /what-is-a-url

How a URL Works

When you enter a URL in your browser:

  1. The browser reads the URL and identifies the protocol (HTTP/HTTPS).
  2. It performs a DNS lookup to convert the domain name into an IP address.
  3. A connection is established with the server using TCP.
  4. The browser sends an HTTP/HTTPS request for the resource.
  5. The server responds:

  6. 200 OK if successful

  7. 404 Not Found if the resource is missing
  8. The browser renders the response into a web page you can see and interact with.

Examples of URLs

Remote Host URL

Remote Host URL with Path

Remote Host URL with Query Parameters

Remote Host URL with Fragment

Localhost URL

Localhost URL with Path

Localhost URL with Query Parameters

Localhost URL with Fragment

Common URL Mistakes

Conclusion

Understanding URLs is fundamental to navigating the web, developing websites, and sharing resources online. By knowing the structure, types, and how URLs work, you can improve your web development skills, SEO knowledge, and overall internet literacy.