• What is URL (Uniform Resource Locator)?

URL (Uniform Resource Locator)

URL (Uniform Resource Locator) is the standardised string that identifies a specific resource on the web and describes how to retrieve it. Every page, image, API endpoint, and downloadable file on the internet has a URL. The format is defined by RFC 3986 and has remained remarkably stable since the early 1990s, which is why URLs from 1994 still work today when the underlying sites are still alive.

The anatomy of a URL

A full URL has up to eight parts. Most real-world URLs use four or five of them:

https://user:pass@example.com:443/path/to/page?query=value#fragment
  |      |      |      |        |      |             |          |
scheme  userinfo  host    port   path  resource    query    fragment

Scheme. The protocol - almost always https in 2026, with http retained for legacy compatibility. Other schemes exist for specific uses (mailto:, tel:, ftp:, file:, data:).

Host. The domain name (or IP address). Case-insensitive. Includes the subdomain, domain, and TLD.

Port. The network port. Usually implicit - 443 for HTTPS, 80 for HTTP. Explicitly specified only for non-standard ports.

Path. The location of the resource on the host. Case-sensitive on most servers. Uses forward slashes as separators, not backslashes.

Query string. Parameters after the ?, separated by &. Used for search terms, filters, tracking parameters, session IDs. Order of parameters doesn’t semantically matter, but affects caching and duplicate-URL detection.

Fragment. Anchor after #. Used to jump to a specific section of a page. Not sent to the server - processed client-side only. Affects browser behaviour but not SEO indexing in most cases.

URL encoding

URLs can only contain a specific set of “safe” characters. Characters outside this set must be percent-encoded:

  • Space → %20 (or + in query strings)
  • Ampersand → %26
  • Non-ASCII characters (é, ü, ß, 中, 🚀) → multi-byte UTF-8 sequences, each byte percent-encoded

Most URL-generating software handles encoding automatically; manual URL construction is where encoding bugs creep in. A URL with café in the path is actually caf%C3%A9 on the wire.

Common URL variations and their meaning

Four scenarios URLs handle specifically:

Absolute vs relative. https://example.com/about is absolute - complete regardless of context. /about is a relative URL - resolved against the current page’s base. about.html (no leading slash) resolves against the current path. Relative URLs are fragile when content moves; absolute URLs are explicit but verbose.

HTTP vs HTTPS. HTTPS is encrypted; HTTP is not. In 2026, HTTPS is effectively mandatory - browsers flag HTTP pages as “Not Secure”, Google uses HTTPS as a ranking signal, and modern APIs refuse HTTP connections. Any site still serving HTTP in 2026 is either legacy or unmaintained.

With and without www. https://example.com vs https://www.example.com. Technically different URLs; redirect one to the other canonically. Either works; consistency matters.

Trailing slash variations. /about/ vs /about. Technically different URLs; usually resolve to the same content. Servers should redirect one to the canonical form to prevent duplicate-content issues.

URLs and SEO

Three ways URLs affect search performance:

Keyword signal. Words in the URL path are a weak ranking signal. A URL with the target keyword in the slug reads as a minor relevance hint. Not worth keyword-stuffing for, but worth considering during slug design. See URL structure for the broader design considerations.

Click-through rate in SERPs. Readable URLs increase CTR slightly. A user looking at two otherwise-identical SERP results picks the one whose URL is legible over the one that’s a string of random IDs.

Social sharing. URLs that are short, readable, and include the page title are more likely to be shared and remembered. Long, parameter-heavy URLs get shortened or abbreviated when shared, losing tracking.

URL shorteners and their trade-offs

Short URLs (bit.ly, tinyurl, t.co, branded short domains) create aliases that redirect to the original. Useful for:

  • Sharing long URLs in character-limited contexts
  • Tracking clicks with URL-level attribution
  • Hiding long affiliate or tracking parameters

Drawbacks:

  • Obscures the destination, which erodes trust
  • Adds a redirect hop that slightly slows load and loses a tiny amount of SEO equity
  • Creates dependency on the shortener service - if the service dies, the links break

Use for tracking, not for structural URLs. Permanent URLs should be the full, original, structured versions.

We built Penfriend to produce content with stable, semantic URLs - readable by humans, friendly to search engines, durable through site migrations. URL decisions compound over years; getting them right at generation time matters.

Related terms