Skip to content
Free Tool Arena

Money & Business · Guide · Text & Writing Utilities

How to write SEO-friendly URLs

URL anatomy, slug rules, structural patterns by page type, canonicalization, 301 redirects, international URL strategy, and tools to check URL health.

Updated April 2026 · 6 min read

URLs are one of the highest-leverage, lowest-effort SEO factors. They appear in search results, get copied into social, live in backlinks forever, and tell both humans and crawlers what a page is about before anyone clicks. A good URL is short, readable, keyword-aware, and stable. A bad one is long, parameter-stuffed, fragile, and quietly costs rankings. This guide covers the rules that matter (and the myths that don’t), how to choose slugs, the structural patterns for different page types, and how to handle changes without destroying SEO.

Advertisement

The anatomy of a good URL

A well-formed URL looks like:

https://example.com/guides/how-to-write-seo-friendly-urls

HTTPS: non-negotiable. Browsers flag HTTP sites as “not secure”, Google uses HTTPS as a ranking signal.

Descriptive domain: tells visitors what kind of site they’re on at a glance.

Logical path: /guides/ or /blog/ signals content category; /tools/ signals a tool.

Readable slug: lowercase, hyphens between words, contains the target keyword, no stop-word padding.

No query parameters for canonical content. ?p=123 or ?page=product&id=abc is fine for filters but not for the primary URL of a page.

Slug rules — what to do

Use lowercase. URLs are case-sensitive. /Guide and /guide are different URLs that may both resolve, causing duplicate content. Always lowercase.

Hyphens separate words. /how-to-write, not /how_to_write or /howToWrite. Google has stated hyphens are word separators; underscores are not.

Include the target keyword. If the page targets “nginx timeout config”, the slug should reflect it. /nginx-timeout-config, not /article-1742.

Drop stop words when they add no meaning.“how-to-fix-a-leaky-faucet” is better as “how-to-fix-a-leaky-faucet” (“a” can stay for readability) or “fix-leaky-faucet” if you want minimal. Avoid stripping so aggressively that the slug becomes cryptic.

Keep it short. Aim for 3-5 meaningful words. Over ~60 characters, search engines truncate in results. Long URLs also get shared less.

Be human-readable. Can you tell what the page is about from the URL alone? If not, fix the slug.

Slug rules — what NOT to do

Don’t use dates for evergreen content./2024/03/15/how-to-write-seo-urls ages poorly. When you update the content, the URL looks stale. Only use dates for genuinely dated content (news, changelogs).

Don’t stuff keywords. /best-cheap- affordable-budget-laptops-under-500 reads as spam to both users and modern search engines.

Don’t use session IDs or query parameters for canonical URLs. /product?sid=abc123&category=shoes — duplicate URL for every session, crawl budget waster.

Don’t use special characters. Spaces, accents, ampersands, and punctuation get URL-encoded to %20/%E9/%26 — ugly and fragile. Stick to a-z, 0-9, hyphens.

Don’t use auto-generated numbers./post/8472 tells nothing. Sites that still do this (some WordPress defaults, some CMSes) lose SEO equity compared to readable-slug sites.

Don’t mirror deep folder structure./category/subcategory/sub-subcategory/topic/page reads as bureaucratic. Two levels of hierarchy is usually enough.

Structural patterns by page type

Blog posts / guides: /guides/[slug] or /blog/[slug]. Keeps content grouped, allows hub pages at /guides/ and /blog/.

Product pages: /products/[slug] or just /[slug] if the domain is product-focused.

Categories: /categories/[category-slug] or /[category] if the site is category-heavy.

Tools: /tools/[tool-slug]. Users recognize this pattern; clean to bookmark.

Author pages: /author/[name-slug]. Good for E-E-A-T (Google’s expertise/experience signals).

Search and filter: /search?q=... and /category/shoes?color=red&size=10. Query params are fine here because these are generated pages, not canonical content.

Trailing slashes

/about and /about/ are technically different URLs. Pick one and redirect the other. Most modern frameworks (Next.js, Gatsby, Hugo) pick a convention and stick with it.

Common choice: no trailing slash except on directory-like paths. /about, /tools, /tools/calculator.

Ensure the redirect is 301 (permanent), not 302, so link equity consolidates on the canonical version.

Canonicalization — tell crawlers which URL is real

Even with good URL structure, duplicates happen: UTM parameters, www vs. non-www, filtered category pages, pagination.

rel=“canonical” tag in the <head> declares the preferred URL for a piece of content. Every page should have one pointing at itself (self-canonical) or at a master version if it’s a duplicate/variant.

Pick www or non-www. Pick a primary, 301 redirect the other. Set up in your hosting config or via Cloudflare Page Rules.

Pick HTTPS. 301 all HTTP to HTTPS.

Handle UTMs. ?utm_source=twitter... pages need canonical tags pointing back to the clean URL, otherwise each shared link becomes a “new” page for crawlers.

URL changes — the redirect playbook

If you must change a URL (rebranding, restructuring, consolidating content):

1. 301 redirect old → new. Permanent redirects pass ~95% of link equity (from Google’s statements over the years). 302 and 307 are temporary and less effective.

2. Update internal links. Don’t rely on redirects forever — each redirect hop adds latency and loses a tiny bit of equity. Fix site-internal links to the new URL.

3. Update canonical tags. The new page should self-canonical to the new URL.

4. Update sitemap.xml. Remove old URLs, submit new.

5. Monitor Search Console. Watch for 404 spikes, coverage issues, and lost rankings over the following weeks.

Never delete a URL without a redirect unless the content is truly retired (then a 410 Gone can be cleaner than a 404).

International and language

Subdirectories: /en/, /fr/, /de/. Easy to manage from one domain, inherits domain authority.

Subdomains: en.example.com, fr.example.com. Separate crawl budget, each is a different “site” from Google’s view.

Country domains (ccTLDs): example.fr, example.de. Strongest local signal; hardest to manage.

Whichever you pick, use hreflang tags to map equivalent pages across languages.

Edge cases

Multiple URLs serving one page: canonical consolidates. Or redirect all but one. Don’t leave duplicates crawlable and unmanaged.

URL contains a phone number, email, or personal info: don’t. URLs end up in logs, backlinks, referrers. Never put sensitive data in the path or query.

URL decorators for analytics: UTM, gclid, fbclid. Accept them, canonicalize them away, don’t include them in your own internal links.

Auto-generated slugs from titles: acceptable for CMSes, but curate high-value pages manually. A blog post title “10 Tips for Better X (That You Haven’t Heard Before!)” should not become a URL.

Tools to check URL health

Google Search Console: inspect any URL to see how Google crawls it, what canonical it assigns, what indexing status.

Screaming Frog: crawl your own site, catch non-canonical URLs, redirect chains, 404s.

Ahrefs / Semrush: see URLs getting the most backlinks — these are the URLs you must never break without a 301.

Browser devtools Network tab: confirm redirects are 301 (Permanent) vs 302 (Temporary).

Common mistakes

Building URLs around the CMS, not the content./?p=42 or /node/185 is a CMS admin URL, not a user-facing one. Always customize.

Keyword-stuffing slugs. /best-cheap-top- affordable-laptops-2024 looks like spam.

Using URLs as breadcrumb hierarchy source of truth. Breadcrumbs and URL paths should generally align but don’t need to mirror perfectly.

Ignoring the mobile user. Long URLs on mobile are unreadable in share dialogs. Short wins.

Not monitoring for soft 404s. A page that returns 200 but shows “nothing found” content wastes crawl budget and can drop rankings.

Run the numbers

Turn any title into a clean SEO slug with the URL slug generator. Pair with the case converter to standardize text before slugifying, and the URL encoder/decoder when dealing with special characters or debugging percent-encoded links.

Advertisement

Found this useful?Email