Skip to main content
Beta: Front-End Checklist is currently in beta. Some issues are still being fixed. Thanks for your patience.
SEOMedium

Include keywords in URL slugs

Checks if URL slugs contain descriptive, keyword-relevant words instead of IDs, random strings, or vague terms.

Utilities
Quick take
Typical fix time 10 min
  • URL slugs should contain the primary keyword of the page in lowercase, hyphen-separated words
  • Avoid numeric IDs (`/page?id=12345`), random strings, or meaningless paths (`/p/a/`) in public URLs
  • Keep slugs concise: 3–5 meaningful words is typical; avoid keyword stuffing
  • Google uses URL words as a weak ranking signal and users use them to assess page relevance before clicking
Why it matters: Descriptive URL slugs help users and search engines understand page content before visiting — a URL like `/buy-running-shoes-women` communicates topic intent that `/products/4832` does not.

Rule Details

URL slugs are the human-readable portion of a URL path. Including relevant keywords makes URLs self-describing for both users and search engines, especially when the slug also stays short and clean under URL length rules.

Code Example

/blog/how-to-train-for-a-marathon
/products/wireless-noise-cancelling-headphones
/services/web-design-london
/about/our-team

Why It Matters

Descriptive URL slugs help users and search engines understand page content before visiting. Google's URL structure guidance (opens in new tab) treats those words as a lightweight relevance hint and a strong UX cue.

❌ Poor Slug Patterns

/p?id=48392                          # Numeric ID, no context
/blog/post-1                         # Sequential number, no topic
/products/SKU-A4B9X                  # Internal code, meaningless to users
/2024/12/25/                         # Date only, no topic
/blog/the-10-best-ways-to-optimize-your-website-for-search-engines-in-2024
# ↑ Too long — trim to core keywords

Slug Guidelines

GuidelineRecommendation
CaseAlways lowercase (/my-page, not /My-Page)
Word separatorUse hyphens (-), not underscores (_) or spaces
Length3–5 words; enough to be descriptive, not stuffed
Keyword placementPut primary keyword early in the slug
Stop wordsOmit filler words (a, the, of, in) when possible
Special charactersAvoid %, #, ?, &, +, spaces

Google has stated that hyphens are treated as word separators, while underscores join words (so running_shoes is read as one word, running-shoes as two).

Changing Slugs Safely

  1. Identify the new, keyword-optimized slug
  2. Create a 301 redirect from the old URL to the new URL
  3. Update internal links across the site
  4. Update the canonical tag
  5. Update the sitemap
  6. Monitor Google Search Console for crawl errors after the change

Framework Examples

Next.js (file-based routing)

app/blog/[slug]/page.tsx
→ URL: /blog/how-to-improve-core-web-vitals

WordPress

Settings → Permalinks → set to "Post name" (/%postname%/)

This replaces /?p=123 with /post-title/.

Note on Existing URLs

If a URL is already indexed and has backlinks, weigh the SEO benefit of a better slug against the risk of losing link equity during a redirect. For high-traffic pages, the redirect preserves most equity, but monitor rankings after the change.

Exceptions

  • Necessary utility or compliance pages can be intentionally brief and should not be judged by the same editorial-depth expectations as ranking-focused content.
  • AI-assisted drafting is not a failure by itself; flag unsupported claims, missing editorial review, or low-originality output instead.
  • When a page has both trust-signal issues and crawl/index problems, make the page eligible to rank first and then improve the content quality signals.

Standards

  • Use these references as the standard for the final search-facing HTML, metadata, and crawl behavior.
  • Check the implementation against Google: Keep a simple URL structure before treating the rule as satisfied.
  • Check the implementation against Google: URLs and their structure before treating the rule as satisfied.

Verification

Automated Checks

  • Inspect rendered HTML and HTTP headers to confirm the expected metadata or crawlability signal is present.
  • Test the affected URL with Google Search Console or equivalent tooling where relevant.
  • Re-crawl a representative page set after deployment.

Manual Checks

  • Confirm the change does not create conflicting canonical-url, robots, or structured-data signals.

Use with AI

Copy these prompts to use with your AI assistant, or install the MCP server to use directly from Claude, Cursor, or Windsurf.

Check

Verify implementation

Crawl the site and examine URL paths. Flag URLs that contain: numeric IDs only, random strings, session tokens, dates without a descriptive slug, or overly generic words (`/page`, `/item`, `/post`). Verify slugs are lowercase and hyphen-separated.

Fix

Auto-fix issues

Rewrite slugs to include the page's primary keyword in natural language. Use lowercase letters and hyphens as word separators. Set up 301 redirects from old URLs to new slugs. Update internal links, sitemaps, and canonical tags.

Explain

Learn more

Explain how keyword-rich URL slugs improve click-through rates in search results, serve as a weak relevance signal for search engines, and make URLs easier to share and understand.

Review

Code review

Review metadata generation, rendered HTML, structured data, and response headers related to Include keywords in URL slugs. Flag exact routes or templates where search-facing output violates the rule, and describe how to verify the final page output.

Sources

References used to support the guidance in this rule.

Further Reading

Tools and supplementary material for exploring the topic in more depth.

Google Search Console
search.google.comTool

Rules that often go hand-in-hand with this one.

Keep URLs concise

Checks URL length for optimal crawlability and usability

SEO
URL Stop Words

Flags common stop words in URL slugs that add length without improving keyword relevance.

SEO
Use hyphens in URLs

Checks that URL slugs use hyphens as word separators, not underscores or spaces

SEO
URL Special Characters

Checks for problematic special characters in URL paths that can cause crawling, parsing, or canonicalization issues.

SEO

Was this rule helpful?

Your feedback helps improve rule quality. This stays internal for now.

Loading feedback...
0 / 385