URL Slug Best Practices: How to Build SEO-Friendly URLs
Slugs are a permanent commitment. Short, descriptive, keyword-bearing, hyphenated — and the seven rules to follow before you hit publish.
A URL slug is the last segment of a page's URL — the part after the final /. For this article, that's url-slug-best-practices. It's a small piece of real estate with outsized consequences: it appears in every SERP result, every backlink, and every share. Get it right before you publish. Changing it later costs you.
Why the Slug Is a Ranking Signal
Google uses the URL as a relevance hint. When someone searches "url slug seo best practices," a URL containing url-slug-best-practices confirms the page is topically relevant before Google even reads the content. It's not a dominant signal — content quality and backlinks outweigh it — but it's free relevance that takes five seconds to get right.
The slug also affects click-through rate. A clean URL like /guides/on-page-seo/url-slug-best-practices communicates what the page is about before the user reads the title or description. A URL like /p?id=4419&cat=seo&ref=blog does not. In competitive SERPs, CTR improvements compound over time.
For a broader look at the on-page signals that move rankings, the on-page SEO guide covers everything from headings to internal links in one place.
The 7 Rules for SEO-Friendly Slugs
Rule 1: Include Your Primary Keyword
The slug should contain the exact keyword phrase (or a clean subset of it) that the page targets. If the page targets "url slug seo best practices," the slug url-slug-best-practices or url-slug-seo both work. Don't keyword-stuff — one clear keyword phrase is enough.
Rule 2: Use Hyphens, Not Underscores
Google's former head of search spam, Matt Cutts, clarified in 2008 that Google treats hyphens as word separators and underscores as word joiners. best-practices is read as "best practices." best_practices is read as "best_practices" — a single unrecognized token.
Always use hyphens. Every CMS worth using defaults to hyphens for exactly this reason.
Rule 3: Lowercase Only
URLs are technically case-sensitive on most servers. Page.html and page.html can return different results, which creates duplicate content problems. Always lowercase slugs. Most modern CMS platforms enforce this automatically, but double-check if you're writing slugs by hand.
Rule 4: Strip Stop Words
Stop words — "a," "an," "the," "of," "and," "for," "in," "to," "with" — add length without adding keyword signal. Strip them from slugs unless removing them changes the meaning.
how-to-write-the-ideal-paragraph-length-for-a-blog becomes ideal-paragraph-length-blog. Cleaner, shorter, still descriptive.
Rule 5: No Dates in Slugs
Publishing dates in slugs (/2024/05/url-slug-guide/) create two problems. First, they communicate staleness — a 2024 article in a 2026 SERP looks outdated even if it's been updated. Second, they lock you into a URL structure that makes updates visible.
If your CMS defaults to date-based URLs, change that setting before you publish anything. The slug should reflect topic, not timestamp.
Rule 6: Keep It Under 75 Characters
Shorter slugs are easier to read, share, and paste. Google doesn't penalize long URLs directly, but longer URLs often indicate over-engineered structure. If your slug runs past 75 characters, you're probably including words that could be cut.
A good test: read the slug aloud. If it sounds like a sentence, trim it.
Rule 7: No Parameters in Canonical URLs
Query parameters — ?utm_source=email&page=2 — should never appear in your canonical URL. They create duplicate content issues (Google sees /article and /article?page=2 as potentially different pages) and they're ugly in SERPs.
Set canonicals explicitly in your CMS or <head> to the clean, parameter-free URL. UTM parameters are fine in links you distribute; they should never be the canonical.
The Redirect Tax: Why Slug Changes Are Expensive
A 301 redirect passes roughly 90–99% of link equity to the destination URL. That sounds fine — until you count how many redirects are chained together. If you change a slug twice, you may have a redirect chain that dilutes equity twice.
More importantly, every backlink, social share, and internal link pointing to the old URL still works — but it now burns a redirect hop every time it's crawled or visited. Over thousands of pages and millions of crawl budget dollars, redirect chains degrade site performance and crawl efficiency.
The practical consequence: treat your slug as permanent the moment you publish. Change it only when the current slug is actively harming discoverability (e.g., it contains a year, a typo, or a keyword the page no longer targets).
How to Handle Slug Changes When You Must
If you have to change a slug, do it right:
- Set up a 301 redirect from the old URL to the new one. No exceptions. A 404 on the old URL destroys all existing link equity.
- Update every internal link pointing to the old slug. Your CMS may do this automatically — verify it.
- Submit the new URL in Google Search Console under URL Inspection and request indexing.
- Update your sitemap to reflect the new canonical URL.
- Check backlinks via Search Console or a backlink tool and reach out to high-authority linkers to update their links. This is rarely worth doing for low-DA links but matters for your top-10 referring domains.
A related structural decision that interacts with URL hygiene is your heading hierarchy — a well-structured page with clean H2s and H3s also influences how Google reads and excerpts your content. See the H2 and H3 heading structure guide for the full breakdown.
Common Slug Mistakes to Avoid
The full title as the slug. CMS defaults sometimes turn "URL Slug Best Practices: How to Build SEO-Friendly URLs" into url-slug-best-practices-how-to-build-seo-friendly-urls. That's 63 characters for something that could be url-slug-best-practices. Edit it before publishing.
Duplicate slugs. Two pages with the same or nearly identical slugs create canonicalization confusion. If you have /seo-guide and /seo-guide-2, one of them needs a better title and slug, not just a number appended.
Slugs that don't match the primary keyword. If the page targets "alt text vs image title text" but the slug is /image-optimization-tips, you're leaving a relevance signal on the table. Match the slug to the keyword. See the alt text vs image title text guide for an example of this in practice.
Including the category in the slug twice. A URL like /blog/seo/seo-tips-for-beginners has "seo" in the path twice. It's redundant and lengthens the URL unnecessarily.
Slug Structure for Different Content Types
| Content type | Recommended structure |
|---|---|
| Blog post / guide | /guides/<topic>/<keyword-slug> |
| Product / feature page | /features/<feature-name> |
| Landing page | /<primary-keyword> |
| Category / hub | /guides/<topic> |
| Tool page | /tools/<tool-name> |
The exact structure depends on your site architecture, but the principle is consistent: the slug should be the shortest accurate description of the page content, in lowercase, hyphenated, keyword-first.
Before You Hit Publish
Run through this checklist:
- Contains primary keyword
- Lowercase, no special characters
- Hyphens only (no underscores, no spaces)
- Stop words removed
- No date
- Under 75 characters
- Matches the page's canonical URL
Five minutes of slug review before publish is worth hours of redirect work later. For related pre-publish checks — especially around internal linking — see the guide on how many internal links per page.