Web Development
SEO-Friendly URL Slugs: Best Practices for Clean, Stable URLs
Create concise page slugs from titles, keep URLs readable, avoid unnecessary dates and parameters, and plan redirects carefully when existing slugs change.
In this article
SEO-Friendly URL Slugs: Best Practices for Clean, Stable URLs
A URL slug is the human-readable part of a page path.
For example:
https://example.com/blog/json-formatting-guideThe slug is:
json-formatting-guideDuck Cloud's Slug Generator converts titles into clean URL-slug candidates locally in the browser.
Make the slug describe the page
A useful slug gives readers a reasonable idea of the destination.
Good:
/http-status-codes-guideLess useful:
/post-49382-final-v2Descriptive URLs are easier to scan in search results, analytics, logs, documentation, and shared messages.
Keep it concise
The slug does not need to contain every word from the article title.
Title:
How to Debug Invalid JSON and API Response Errors
Possible slug:
debug-invalid-json-api-responsesRemove words that add no useful distinction, but do not shorten so aggressively that the URL becomes vague.
Use lowercase consistently
Lowercase URLs reduce accidental duplicates and case-related server differences.
Prefer:
/json-validator-guideover a mixture such as:
/JSON-Validator-GuideThen configure the application consistently so alternate case variations do not produce duplicate pages.
Use hyphens between words
Hyphen-separated slugs are easy to read:
/css-gradient-generatorThe Slug Generator handles common title cleanup and hyphenation.
Avoid unnecessary dates
A date in the URL can make evergreen content look outdated:
/2026/09/json-guideDate-based paths can still make sense for news archives or publication structures, but they are not necessary for every evergreen guide.
Changing the article's title later should not require changing its slug.
Avoid implementation details
Do not expose framework-specific paths unless they are part of the intended public information architecture.
A URL such as:
/pages/[slug]/render?id=412is less stable and readable than a deliberate public route.
Slugs should be stable
Once a public URL earns links, bookmarks, search visibility, and references, changing it has a cost.
Do not regenerate slugs automatically every time an editor updates the title.
Treat the slug as a durable identifier unless there is a strong reason to change it.
Redirect old URLs
When a slug must change, redirect the old URL directly to the new canonical URL.
Use Duck Cloud's Redirect Checker to verify the complete chain.
Avoid:
old-a → old-b → old-c → finalwhen you can configure:
old-a → finalAvoid duplicate URLs
A site might accidentally expose the same content at:
/tools/json
/tools/json/
/tools?name=jsonDepending on the architecture, canonicalization, routing, and redirects should make the intended URL clear.
Internal links should consistently use the preferred version.
Unicode and transliteration
International sites must decide whether public slugs preserve native-language characters or transliterate them.
Both strategies can work, but consistency matters.
Test:
- browser display;
- copying and sharing;
- percent-encoding;
- CMS behavior;
- redirects;
- analytics tools.
Slug generation workflow
- Write the final topic.
- Identify the primary descriptive phrase.
- Remove unnecessary filler.
- Generate a lowercase hyphenated candidate.
- Check for existing routes.
- Keep it stable after publishing.
- Redirect the old slug if a change is unavoidable.
- Update internal links to the final canonical URL.
A good URL slug is simple enough that nobody notices it. It describes the page, survives title changes, and stays stable while the content evolves.