All articles
SEO Tools 6 min readBy DigiMetrics Hub TeamPublished

What Is a URL? Structure, Parts and How It Works (2026 Guide)

Learn what a URL is, the anatomy of every URL (scheme, domain, path, query), how URLs work with DNS, and how to decode any URL.

Browser address bar with each URL part highlighted in different neon colours

Every webpage on the internet has a unique address. That address is a URL. You see them hundreds of times a day — but most people have never thought about what each part actually means. Here's a clean breakdown.

What Is a URL?

URL stands for Uniform Resource Locator. It's the unique address of a specific resource on the internet — a page, an image, an API endpoint.

People sometimes confuse URLs with domain names. The domain (digimetricshub.com) is just one piece of a URL. The URL is the full address, including the protocol, the domain, the path, and any query parameters.

And URLs vs URIs? A URL is a type of URI (Uniform Resource Identifier) that specifies both what the resource is and where to find it.

Browser address bar with each URL part highlighted in different neon colours

The Anatomy of a URL

Take this example: https://www.digimetricshub.com:443/blog/what-is-dns?ref=homepage#section1

  • Scheme (https://) — the protocol used. http is unencrypted; https is TLS-encrypted.
  • Subdomain (www.) — an optional prefix; common values include www, blog, app, api.
  • Domain (digimetricshub.com) — the human-readable identifier of the website.
  • Port (:443) — usually hidden. 443 is the default for HTTPS, 80 for HTTP.
  • Path (/blog/what-is-dns) — the specific page or resource within the site.
  • Query string (?ref=homepage) — parameters passed to the page, often for tracking or filtering.
  • Fragment (#section1) — jumps to a specific section on the page; handled entirely in the browser, never sent to the server.

How a URL Works (with DNS)

When you hit Enter, your browser pulls out the domain, asks DNS for the matching IP address, opens a connection to that IP, requests the path, and displays whatever the server returns. The fragment is applied locally after the page loads.

Want to understand the DNS step in detail?

Read: What Is DNS?
Ad Space

URL Encoding — What Are Those %20 Characters?

URLs can only safely contain a limited character set. Spaces and many special characters must be 'percent-encoded'. Space becomes %20, @ becomes %40, & becomes %26, and so on.

Encoding matters for developers — if you stick raw user input into a URL without encoding, you risk broken links and injection attacks.

Encode or decode any URL instantly.

Open URL Encoder

Parse and break down any URL into its parts.

Open URL Parser

URL Parameters and Query Strings

  • ?utm_source=google&utm_medium=cpc — UTM parameters for analytics tracking.
  • ?page=2&sort=price — pagination and filtering in web apps.
  • ?id=12345 — passing a database record ID to the page.

What Makes a Good URL (SEO Perspective)

  • Keep them short and descriptive.
  • Use hyphens, not underscores — Google treats hyphens as word separators.
  • Include the target keyword in the path.
  • Lowercase only — uppercase URLs cause duplicate-content issues on case-sensitive servers.
  • Avoid unnecessary query parameters on indexed URLs.

Example: /blog/what-is-a-url is far better for SEO than /p?id=4872.

Absolute vs Relative URLs

  • Absolute — the full URL including scheme and domain (https://digimetricshub.com/blog/post).
  • Relative — just the path, resolved against the current page (/blog/post or ../post).

In HTML, internal links are usually relative for portability. Canonical tags, sitemaps and external links should always be absolute.

Frequently Asked Questions

What is the difference between a URL and a domain name?

A domain name is the human-readable address of a website (digimetricshub.com). A URL is the complete address, including the protocol, domain, path and parameters — for example, https://digimetricshub.com/blog/what-is-dns.

What does https:// at the start of a URL mean?

HTTPS is HyperText Transfer Protocol Secure. The 'S' means the connection is encrypted using TLS. A site without HTTPS uses plain HTTP, which is unencrypted.

What is a URL parameter?

A URL parameter is a key-value pair after the question mark, like ?sort=price. Parameters pass information to the server or page and are commonly used for filtering, pagination and marketing tracking.

Why do some URLs have %20 in them?

%20 is the URL-encoded representation of a space. Since spaces aren't allowed in URLs, they must be encoded. Each special character has its own percent-encoded equivalent.

Does a URL affect SEO?

Yes. Clean, descriptive URLs with relevant keywords help search engines understand the page. Google recommends short URLs with hyphens between words and avoids dynamic URLs with long query strings for indexed pages.

Ad Space

Related articles