Website Spec
← SEO
Recommended

URL structure

URLs are the most stable identifier on the web. Keep them lowercase, hyphenated, descriptive, and shallow. Treat them as a public API for your content.

What it is

A URL is the canonical name for a resource on the web. Its syntax is defined by RFC 3986 and refined for the browser by the WHATWG URL Living Standard. The path component — everything after the host — is where structure choices have the most impact on SEO and usability.

https://example.com/articles/web-security/csp
            ^host       ^path

Why it matters

URLs are quoted in chat, pasted into documents, printed on slides, and saved in bookmarks for years. Once a URL is public, it is effectively forever — changing it requires a redirect, and chains of redirects degrade. They also appear under the page title in search results, so a clean, readable URL is a small but real signal of quality to both users and crawlers.

A consistent URL structure also makes analytics, A/B testing, redirect rules, and access controls dramatically simpler.

How to implement

Treat URLs as a public API:

Good:  https://example.com/articles/web-security/csp
Bad:   https://example.com/Articles/Web_Security/CSP/?id=12345&utm_source=x

Common mistakes

Verification

Sources