SEO

URL slug

A Uniform Resource Locator (URL) slug is the user-readable portion of a web address that appears after the domain name to identify a specific page.

also called: permalink, permalinks

// definition

A Uniform Resource Locator (URL) slug is the final portion of a web address that identifies a specific page in a human-readable format. Slugs are typically composed of lowercase letters, numbers, and hyphens, which replace spaces to ensure proper formatting across web browsers. Search engines and website administrators use slugs to provide clear context about the content of a page before a user visits it.

A slug differs from a complete URL, which includes the access protocol, subdomains, domain name, and optional parameters or file extensions. While the full web address specifies the exact location and network protocol of a resource, the slug refers strictly to the customized text string appended to the end of the domain path.

// why it matters

Well-structured slugs improve both user experience and Search Engine Optimization (SEO). When a slug contains clear, descriptive keywords, search engine crawlers can categorize the page content more accurately, which aids in relevant indexing. Clear slugs also appear directly in search engine results pages, giving users immediate context about the destination page. Conversely, cryptic slugs containing random numbers or characters obscure the page purpose, reducing user trust and click-through rates. Standardizing slug creation across a website prevents broken links, reduces duplicate content issues, and simplifies long-term site maintenance.

// example

For an online bookstore selling leather notebooks, a poorly formatted web address might end with a generic identifier like page-id-8492. In contrast, an optimized slug uses clear descriptors separated by hyphens, such as leather-bound-notebooks. In the complete web address https://www.example.com/products/leather-bound-notebooks, the string leather-bound-notebooks serves as the slug, indicating the exact topic of the page to both users and search engines.

Questions and Answers

Should I use spaces or hyphens in a URL slug?
You should always use hyphens to separate words in a URL slug. Web browsers process spaces as encoded characters like percent twenty, which makes addresses difficult to read and parse. Hyphens act as standard word separators recognized by all major search engines, ensuring the address remains readable for both human visitors and automated crawlers.
Can I change a URL slug after publishing a page?
Yes, you can change a URL slug after publishing, but doing so requires setting up a proper redirect. Changing a slug alters the page location, which breaks existing backlinks and saved bookmarks. Setting up a permanent 301 redirect from the old slug to the new slug preserves search authority and forwards visitors seamlessly.
How long should a URL slug be?
A URL slug should ideally be between three and five words long. Concise slugs clearly convey the page topic without adding unnecessary text. Brief, keyword-focused slugs are easier for users to read, copy, and share, while excessively long slugs can get truncated in search engine result snippets.