URL slug (the readable name of a page in its address)
What a URL slug is, where it sits in a URL in the terms of the URL standard, how it differs from a permalink and a handle, and what makes a good one.
On this page
A URL slug is the part of a web address that names one page in readable words, usually the last path segment, such as trail-runner-2-forest-green in /products/trail-runner-2-forest-green.
What it means in practice#
The slug is the name of a page inside its address. In a shop, every product, category and article has one, and it is what you edit when you "change the URL" of a product. Shop and content systems create it from the title when the page is first saved: lowercase, with hyphens between the words. The WordPress glossary describes it as "a few words that describe a post or a page", usually "a URL friendly version of the post title".
People read slugs in search results, in links they share and in the address bar. That makes the slug one item on the product page SEO checklist.
Where the slug sits in a URL#
Take https://shop.example/products/trail-runner-2-forest-green?size=42#reviews:
| Part | In the example | Term in the URL Standard |
|---|---|---|
https | How the page is fetched | Scheme |
shop.example | The shop's domain | Host |
/products/trail-runner-2-forest-green | Where the page lives | Path, made of two path segments |
trail-runner-2-forest-green | The name of this page | The last path segment: the slug |
size=42 | An option for the page | Query |
reviews | A place on the page | Fragment |
"Slug" is not a term of the standards. The URL Standard speaks of a path and its segments: "A URL path segment is an ASCII string. It commonly refers to a directory or a file, but has no predefined meaning." RFC 3986 says the same from the other side: "A path consists of a sequence of path segments separated by a slash ("/") character." The word slug comes from publishing systems, which needed a name for the segment an editor writes.
Slug, permalink and handle#
| Term | What it is | Example |
|---|---|---|
| Slug | The readable name of one page: a single path segment | wordpress-203 |
| Permalink | The whole permanent URL of a page. WordPress defines it as "a URL at which a resource or article will be permanently stored". The slug is one part of it | https://wordpress.org/development/2006/06/wordpress-203/ |
| Handle | Shopify's name for the same idea. A handle is generated from the title, always lowercase, with whitespace and special characters replaced by hyphens, and it "is used to build the URL for the resource". Templates also use it to fetch the resource | potion, and potion-1 for a second product with the same title |
Both systems keep the address when the title changes. Shopify's documentation says: "After a resource has been created, changing the resource title doesn't update the handle." The WordPress glossary says a post slug "should not be changed". A changed slug is a changed URL, and the old one then needs a redirect.
What makes a good slug#
- Readable words that describe the page, not an ID number.
- Lowercase, with hyphens between the words.
- In the language of the page, with umlauts and accents transliterated or percent-encoded.
- Stable: when it has to change, the old address redirects to the new one.
Google's wording for these rules, good and bad examples and the redirect steps are in URL slugs for product pages. The slug generator at the top of this page applies the first three lines to a list of product names.
Three neighbors of the slug have their own guides: image file names follow the same pattern (image SEO for product pages), each language version of a page gets a slug in its own language (hreflang for online shops), and colors and sizes need addresses too (product variants).
Questions
What is a slug in a URL?
The readable name of one page inside its address, usually the last path segment. In https://shop.example/products/trail-runner-2-forest-green the slug is trail-runner-2-forest-green.
Is a slug the same as a permalink?
No. The permalink is the whole permanent URL of a page; the slug is the one part of it that names the page. WordPress's glossary gives the permalink https://wordpress.org/development/2006/06/wordpress-203/ and its slug wordpress-203.
Can I change a slug later?
Yes, but the address changes with it, so the old URL has to redirect to the new one with a permanent redirect. Shop and content systems keep the slug when you edit the title for that reason.
Sources
- URL StandardWHATWGchecked 23 November 2026
- RFC 3986: Uniform Resource Identifier (URI): Generic SyntaxIETFchecked 23 November 2026
- WordPress GlossaryWordPress.org Documentationchecked 23 November 2026
- Liquid basics: HandlesShopify developer documentationchecked 23 November 2026
- URL structure best practices for Google SearchGoogle Search Centralchecked 23 November 2026
- How to write product descriptions: structure, examples and channel rulesGuides
- Hreflang for online shops: languages, countries and x-defaultGuides
- JSON-LDGlossary
- Meta title and description length for product pagesGuides
- Product description examples and a template you can copyGuides
- Product page FAQ: which questions to answer, and FAQ schemaGuides
- Product schema markup: the structured data Google needsGuides