TL;DR:
- Keep URLs short, human readable, and stable.
- Use lowercase words and hyphens, avoid underscores.
- Trim useless parameters. Never expose session IDs.
- Use canonical tags and 301s to handle duplicates.
- Match URL paths to clear site structure and intent.
Clean URLs help users and crawlers. They set clear context, reduce crawl waste, and prevent duplicate pages.
This guide uses Google’s documentation and leading SEO sources. It turns their advice into steps you can ship today.
All dates below use the Asia/Kolkata timezone. Today is 2025-10-03.
Why URLs matter
Google uses URLs to find, crawl, and understand pages. Short, descriptive paths reduce errors and make your intent clear. Google’s docs stress crawlable, standard compliant URLs and warn about waste from messy parameters and session IDs. Ahrefs also recommends descriptive slugs that mirror site structure for easier discovery.
Principles that always hold
1) Keep it human first
Write URLs that humans can read and guess. Aim for 3 to 6 words in most slugs. Remove filler like “and,” “the,” or dates unless they are the topic.
Google says URLs should be simple and descriptive. This helps users and crawlers understand content at a glance.
2) Use lowercase and hyphens
Use lowercase letters. Servers often treat case differently. Google notes URLs are case sensitive, so pick one style and stick with it. Use hyphens as word separators, not underscores.
3) Keep slugs short and stable
Shorten slugs to the main topic. Do not include dates, version numbers, or promo codes unless they are core to the page. Ahrefs suggests boiling a slug down to the primary keyword and making it readable.
4) Trim parameters
Use as few parameters as you can. Remove any that do not change content, such as tracking parameters. Google’s docs advise shortening URLs by trimming non content parameters. Search Engine Journal also reported Google’s guidance to use standard = and & for parameters, and to avoid odd separators.
5) Never expose session IDs
Session IDs create infinite URL versions and waste crawl budget. Google advises avoiding them and using cookies instead.
Bad: /cart?sessionid=6EE2BF…
6) Encode non ASCII safely
Use percent encoding for non ASCII characters in links. This prevents broken links and parsing issues.
Good: /gem%C3%BCse/
Risky: /gemüse/
7) Match URL paths to a clear site structure
Your folder paths should mirror your information architecture. Ahrefs recommends a logical nesting that supports internal linking and discovery.
Example:
/blog/seo/url-structure/ lives under SEO within the blog section.
Do I need to rewrite dynamic URLs?
You do not need to hide parameters behind fake folders. Google can crawl dynamic URLs. The priority is clarity and stability, not forcing everything to look static. Keep parameters clean and limited.
Ecommerce specifics
Faceted navigation can explode URL count. Plan parameter handling, internal linking, and canonicalization. Google’s ecommerce guidance covers patterns that cause crawl traps and how to design around them.
Canonicals, redirects, and consistency
Even with perfect slugs you will face duplicates. Fix them early.
- Canonical tags: Point similar URLs to the preferred one.
- 301 redirects: When you change a slug, redirect the old URL to the new. Avoid chains.
- Internal links: Link only to the canonical version.
Academic research shows long redirect chains and soft 404s harm reliability and outcomes at scale. Keep redirect hops to one whenever possible.
Common questions
Should I remove stop words?
Remove if they add length without meaning. Keep them if they help clarity. Short and readable beats robotic.
Should I include categories?
Yes, when they reflect a stable hierarchy and help users. Keep depth shallow, usually one or two levels.
What about file extensions?
Hide .php, .html, and similar. They add noise and can break if you switch tech later.
This mirrors a practical flow shared by Ahrefs on building slugs that are short and readable.
Handling parameters without pain
When parameters are needed, follow a standard style.
- Use ?key=value and & between pairs.
- Keep stable ordering, such as alphabetical.
- Only index versions that change content.
- Block obvious traps in robots.txt with care.
- Avoid adding parametered URLs to sitemaps.
Google’s docs tell you to trim unnecessary parameters. SEJ highlights Google’s preference for standard separators.
Quick reference: URL do’s and don’ts
Do | Don’t | Why |
Use lowercase, hyphen separated words | Use uppercase or underscores | Improves readability and avoids duplicates. |
Keep slugs short and stable | Add dates, IDs, promos | Stability helps links and memory. |
Trim non content parameters | Append UTM or click IDs | Wastes crawl budget and duplicates pages. |
Encode non ASCII characters | Paste raw emojis or diacritics | Prevents parsing issues. |
Mirror site structure in paths | Mix random folders | Supports discovery and context. |
Use one canonical URL | Let variations index freely | Consolidates signals. |
Why it matters
Solid URLs protect crawl budget, cut index bloat, and improve click trust. They make analytics cleaner. They also make migrations safer.
Sources:
- Google Search Central, URL structure best practices, https://developers.google.com/search/docs/crawling-indexing/url-structure, accessed 2025-10-03
- Google Search Central, Designing a URL structure for ecommerce sites, https://developers.google.com/search/docs/specialty/ecommerce/designing-a-url-structure-for-ecommerce-sites, accessed 2025-10-03
- Ahrefs, How to create SEO-friendly URLs (Step-by-Step), https://ahrefs.com/blog/seo-friendly-urls/, accessed 2025-10-03
- Ahrefs, How to structure your website architecture for SEO, https://ahrefs.com/blog/website-structure/, accessed 2025-10-03
- Search Engine Journal, Google revises URL parameter best practices, https://www.searchenginejournal.com/google-revises-url-parameter-best-practices/530814/, published 2024-10-24, accessed 2025-10-03
- Google Search Central Help, Googlebot encountered an extremely high number of URLs, https://support.google.com/webmasters/answer/76401, accessed 2025-10-03
arXiv, Not Here, Go There: Analyzing Redirection Patterns on the Web, https://arxiv.org/abs/2507.22019, published 2025-07-29, accessed 2025-10-03