How to write a good URL slug
The slug is the part of a web address that identifies a specific page, usually at the end. In https://wordformat.net/guides/title-case-rules/, the slug is title-case-rules. It’s a small detail, but a clear slug helps people understand a link before they click it and makes your site easier to organize.
What makes a good slug
- Descriptive: someone should be able to guess what the page is about from the slug alone.
/blog/remove-duplicate-lines-excelbeats/blog/post-4471. - Short: three to six words is usually enough. Long slugs are hard to read in a link and get cut off when shared.
- Lowercase: many web servers treat URLs as case-sensitive, so
/Aboutand/aboutcould be different pages. Lowercase avoids duplicates and broken links. - Hyphens between words: Google’s guidelines recommend hyphens rather than underscores, because hyphens are read as word separators.
- Plain characters: letters a to z, digits and hyphens. Accented letters, spaces and symbols get encoded into strings like
%C3%A9when copied, which looks messy in emails and chats.
Wordformat’s URL slug generator applies these rules automatically: it lowercases the title, converts accented letters to plain ones, turns “&” into “and”, drops apostrophes and other punctuation, and joins the words with hyphens.
Examples
| Page title | Generated slug | Edited slug |
|---|---|---|
| 10 Best Cafés in Montréal (2026 Guide) | 10-best-cafes-in-montreal-2026-guide | best-cafes-montreal |
| How to Remove Duplicate Lines in Excel | how-to-remove-duplicate-lines-in-excel | remove-duplicate-lines-excel |
| What’s New in Version 3? | whats-new-in-version-3 | version-3-release-notes |
Should you remove “stop words”?
Small words such as a, the, in and to can usually be removed to shorten a slug, but there’s no rule that you must. Keep them when the slug reads oddly without them, or when they change the meaning: /how-to-cook-rice is fine as it is.
Leave out things that will change
A slug should stay the same for the life of the page, so leave out details you might update:
- Years (“2026”): you’ll want to update the article next year without changing its address.
- Numbers in list posts (“10-best”): the list may grow to 12.
- Words like “new” or “latest”, which become untrue over time.
Changing a slug without breaking links
If a page has been live for a while, other sites, bookmarks and search engines point to its current address. If you change the slug, set up a 301 (permanent) redirect from the old URL to the new one. Visitors are forwarded automatically, and search engines transfer the old page’s standing to the new address. Most content management systems, including WordPress (with a redirect plugin) and Shopify, can create redirects, and hosting platforms such as Cloudflare and Netlify support redirect rules. Update your own internal links too, so they don’t rely on the redirect.
Do slugs affect search rankings?
Only a little. Google has said that words in a URL are a very light ranking signal. Slugs matter more for people: a readable link looks more trustworthy when it is shared, and it hints at what the page is about in search results. That alone is reason enough to spend ten seconds on a good one.