How to Make SEO-Friendly URLs: Steps, Examples, and Best Practices

by Orion Fairbanks

  • 16.09.2025
  • Posted in SEO
  • 0 Comments
How to Make SEO-Friendly URLs: Steps, Examples, and Best Practices

You don’t “add SEO” to a URL like a spice. You shape the URL so it’s short, clear, and predictable. That helps search engines understand the page and helps people click it. As of 2025, keywords in URLs are a light signal, but clean structure, canonicalization, and correct redirects still move the needle for crawl, indexing, and click-through.

What you likely want to get done today:

  • Know what a good URL looks like and why it matters.
  • Change a slug without tanking rankings (yes, redirects).
  • Edit URLs in WordPress, Shopify, Wix, Squarespace, and custom stacks.
  • Handle canonical tags, parameters, trailing slashes, and www vs non-www.
  • Use a simple checklist so you don’t repeat mistakes.

TL;DR: The short answer

  • Keep URLs human-first: short, lowercase, hyphens between words, no fluff.
  • Include one clear topic keyword if it fits naturally; don’t stuff.
  • Pick one version of each URL (slash vs no slash, www vs non-www, http vs https) and redirect all others with 301.
  • When changing a URL, use a 301 redirect, update internal links and sitemaps, and keep a canonical pointing to the live URL.
  • Avoid IDs, dates, session IDs, and random parameters for indexable pages.

Step-by-step: Make your URLs SEO-friendly

Here’s the exact flow I use on client sites in 2025. It’s safe, quick, and doesn’t require a developer for most CMS setups.

1) Decide the ideal structure

  1. Start with https. One host (either with or without www). Pick one and stick to it via 301 and HSTS.
  2. Keep paths shallow: /category/page or /topic/page. Avoid deep nesting like /blog/2025/09/16/this-post.
  3. Write the slug like a title you’d text a friend: lowercase, hyphens, 3-5 key words: /best-running-shoes not /Best_Running_Shoes_2025!!
  4. Drop stop words unless they’re needed for clarity. “/how-to-file-taxes” is fine; “/file-taxes” is also fine.
  5. Remove file extensions (.php, .html) unless your platform forces them.

Google’s documentation recommends hyphens over underscores, lowercase, and descriptive terms. It also warns that keywords in URLs are a small signal; the bigger win is clarity for users and consistent canonicalization.

2) Create or edit the slug

  1. Draft a short slug with your main topic word: /coffee-grind-size.
  2. Sanitize: remove punctuation, use ASCII where possible, and percent-encode only when needed (per RFC 3986).
  3. Test the slug out loud. If it sounds awkward, it usually reads awkward.

3) Implement safely in your CMS

Pick your platform and follow the steps.

WordPress

  1. Settings → Permalinks → choose “Post name.”
  2. When editing a post or page, click the URL under the title → Edit → set the slug.
  3. If the URL changes, add a 301 redirect. Many SEO plugins (Yoast, Rank Math, All in One SEO) auto-create these or give a Redirections tool.
  4. Regenerate and resubmit your XML sitemap in your SEO plugin.

Shopify

  1. Products/Pages/Collections → select item → Search engine listing → Edit website SEO → set URL and handle.
  2. Shopify will prompt to create a redirect from the old URL. Accept it.
  3. Note: Shopify prefixes like /products/, /collections/ are fixed. Optimize the slug within that path.

Wix

  1. Site Dashboard → SEO → SEO Patterns or page SEO settings.
  2. Edit page URL. Wix will ask to create redirects; confirm.
  3. Update your sitemap via the SEO Tools panel if needed.

Squarespace

  1. Page → Settings → URL Slug → set the new slug.
  2. Settings → Advanced → URL Mappings for manual 301s when you change structure.

Webflow

  1. Page or Collection item → Settings → Slug.
  2. Project Settings → Publishing → 301 Redirects to map old to new paths.

Custom (Apache/Nginx/Node)

  1. Apache (.htaccess): Redirect 301 /old-url /new-url or use mod_rewrite for pattern rules.
  2. Nginx: rewrite ^/old-url$ /new-url permanent; or server-wide return 301 rules.
  3. Express/Next/Nuxt: use the framework’s redirect config (e.g., next.config.js redirects array).

4) Set canonical and handle parameters

  1. Add a canonical tag on each indexable page pointing to its preferred URL.
  2. For filter/sort pages (e.g., ?color=blue), keep canonicals pointing to the main category unless those pages deserve to rank. This reduces duplicate content.
  3. UTM parameters are for tracking only; keep them noindex via canonical to the clean URL.

Google Search Central advises using the canonical link element for duplicate or near-duplicate pages and being consistent with internal linking to the canonical version.

5) Redirect correctly and test

Use permanent (301) redirects for all URL changes that you intend to keep. Temporary (302) only when the move is genuinely temporary.

Status When to use SEO effect
301 (Moved Permanently) Permanent URL change; consolidate variants Passes signals to the new URL; best for migrations
302 (Found/Temporary) Short-term tests, promos, A/B Search may keep the old URL indexed
307/308 HTTP/1.1 & HTTP/2 compliant versions of 302/301 Treated similarly to 302/301 respectively
410 (Gone) Content removed with no replacement Signals permanent removal; can clear index faster

HTTP semantics are defined by the IETF (RFC 9110). Search engines treat 301 and 308 as permanent; 302 and 307 as temporary.

After redirects:

  • Click through internal links to confirm they’re updated to the new URL (avoid redirect chains).
  • Fetch as Google in Search Console’s URL Inspection tool to confirm the canonical and final URL.
  • Update your XML sitemap with only the canonical URLs and resubmit in Search Console and Bing Webmaster Tools.

6) Keep consistency rules

  • Lowercase only (some servers treat uppercase as different paths).
  • Use hyphens, not underscores.
  • Decide on trailing slash. If you use it, use it everywhere and redirect the other version.
  • Pick www or non-www and redirect to your choice.
  • One live URL per piece of content. Everything else redirects or is canonicalized.

Google has stated they don’t care which format you choose, as long as you’re consistent and canonical to one version.

Examples and templates that work

Examples and templates that work

Steal these patterns and tweak them to your brand voice. They’re clean, memorable, and map clearly to search topics.

Blog posts

  • Good: /blog/coffee-grind-size-chart
  • Good: /guides/how-to-change-bike-brakes
  • Not good: /blog/2025/09/16/123?ref=home

Why: shorter paths, topic words up front, no dates (prevents content looking stale in URLs when it ages).

Product pages

  • Good: /products/nike-pegasus-41
  • Good: /shop/mens-waterproof-hiking-jacket
  • Not good: /p?id=847263

Use model names or descriptive phrases customers actually search. For variants, keep the parent URL canonical and parameters for size/color unless variants have distinct search demand.

Categories

  • Good: /running-shoes
  • Good: /coffee-beans/espresso
  • Not good: /category-12

Two levels are usually enough. Deeper nesting often hurts click depth and internal link equity.

Local and international

  • Country folders: /nz/insurance-home, /au/insurance-home
  • Languages: /en-nz/, /mi-nz/ (with hreflang)
  • ccTLD route: use .co.nz for New Zealand targeting if you’re only serving NZ

W3C Internationalization and Google guidance recommend hreflang for language-region variants and consistent folder naming. Keep each locale’s content self-contained with proper canonicals.

Pagination and filters

  • Pagination: /blog?page=2 or /blog/p/2, canonical each page to itself; link to page 1.
  • Filters: /running-shoes?brand=asics&color=black; canonical to /running-shoes unless filter pages are curated and unique.

Google no longer uses rel="next"/"prev" as a special signal; keep internal links crawlable and provide clear pagination.

What about long titles?

Title: “How to Choose a Mirrorless Camera for Low Light Photography in 2025.”

URL: /choose-mirrorless-camera-low-light (six words, no date). Add the year in the page title, not the slug, unless “2025” is essential to the topic.

URL SEO checklist & cheat sheet

Bookmark this and run through it before you publish or change anything.

  • Protocol: site is on HTTPS only; HTTP redirects to HTTPS.
  • Host: www vs non-www chosen and enforced via 301.
  • Case: lowercase only; test for mixed-case 404s.
  • Slashes: trailing slash choice enforced and consistent.
  • Words: 3-5 meaningful words; no stuffing; natural order.
  • Separators: hyphens only; no underscores or spaces.
  • Length: aim < 60 characters when possible; shorter improves readability and often CTR.
  • Noise: remove dates, IDs, stop words (unless needed), file extensions.
  • Hierarchy: shallow path (1-2 folders) that mirrors your IA.
  • Canonicals: present and point to the preferred URL; match internal links.
  • Parameters: use for tracking or filters; canonical to the clean version unless the parameter represents unique content worth indexing.
  • Redirects: 301 from any old URL to the new one; avoid chains; no redirect loops.
  • Sitemap: only canonical URLs; update and resubmit after changes.
  • Robots: don’t block CSS/JS needed to render; avoid blocking canonical pages in robots.txt.
  • Monitoring: watch for 404s, soft 404s, and stray 302s in Search Console/Crawl reports.

Simple heuristics I use:

  • If you can’t explain the URL in one breath, it’s too long.
  • If two different URLs serve the same content, you have a duplication problem. Canonicalize and redirect.
  • If a parameter creates thousands of combinations, use noindex/canonicals and consider disallow for crawl management (carefully).

Keyword guidance:

  • Include the head term once if it makes sense: shoes → /running-shoes.
  • Avoid adding modifiers you can put in the title: “cheap, best, 2025” unless they’re core to the topic.
  • Never repeat a keyword in the slug: /running-shoes-running-shoes looks spammy.

If you remember one phrase from this article, make it this: build SEO-friendly URLs for people first, then tidy up the technical signals so search engines can trust what they see.

FAQ, edge cases, and next steps

FAQ, edge cases, and next steps

Do keywords in the URL boost rankings?

A bit, but not much. Google representatives have said for years that keywords in URLs are a light signal. The bigger upside is clearer snippets and better CTR. Don’t chase tiny gains at the cost of breaking good URLs.

Should I change old messy URLs?

If a URL already ranks and has links, think twice. The benefit of making it pretty might not beat the short-term turbulence of a redirect. If you must change it (brand, clarity, consistency), do a 301, update internal links, and keep the old URL mapped forever.

Trailing slash or no trailing slash?

Pick one and be consistent. Many sites use trailing slashes for directories and none for files, but modern setups often treat them the same. Redirect the non-preferred to the preferred and canonical accordingly.

Hyphens or underscores?

Hyphens. Google’s documentation recommends hyphens as word separators. Underscores run words together.

Uppercase OK?

Avoid. Some servers are case-sensitive, so /Shoes and /shoes can be different. Use lowercase and redirect any uppercase requests.

Dates in URLs?

Skip them for evergreen content. They make pages look stale in the SERP. Keep dates in titles or on-page schema if you need freshness signals.

What about faceted navigation (color, size, price filters)?

Keep filtered URLs crawlable only if they serve unique, valuable demand (e.g., /running-shoes/black-men). Otherwise, canonical filters to the base category and consider limiting crawl via robots.txt for explosion-prone parameters. Test impact in Search Console.

Will UTMs get indexed?

They can. Canonical filtered/UTM pages to the clean URL. Search engines try to cluster them, but help them with explicit canonicals and consistent internal links to the clean version.

How long until changes show up?

After a 301 and sitemap update, small sites can see updates in days; big sites may take weeks. Crawl budget, internal links, and external links affect timing.

When to use 410 vs 301?

Use 410 when a page is permanently gone with no replacement. Use 301 when there’s a relevant successor page. Standards (RFC 9110) define semantics; search behavior aligns with those meanings.

Does Google still use rel="next"/"prev" for pagination?

No. Google has stated it no longer uses those as special signals. Keep clear links between pages, logical titles, and self-referencing canonicals.

How do I handle multi-region sites (.com vs .co.nz)?

Pick a structure (ccTLDs like .co.nz, subdomains, or subfolders). Use hreflang for language/region pairs, and keep each locale’s URLs self-contained. Google’s guidance supports any model if it’s consistent and well linked.

Next steps & troubleshooting

  • Audit existing URLs with a crawler (Screaming Frog, Sitebulb) to find duplicates, uppercase, underscores, and parameters.
  • Fix one class of issues at a time (e.g., trailing slash) to avoid chains.
  • Set sitewide rules: HTTPS-only, host canonicalization (www/non-www), trailing slash normalization.
  • Map all old → new URLs in a spreadsheet; implement 301s; test with curl or your crawler.
  • Update internal links and nav; don’t rely on redirects to fix internal URLs.
  • Regenerate and submit your XML sitemap; request recrawl of key templates in Search Console.
  • Monitor 404s, redirect chains, and soft 404s; clean them weekly for a month after changes.
  • Watch CTR in Search Console by URL. Cleaner slugs often lift CTR, especially on mobile.

If you’re rebuilding a large site or switching domains, plan a redirect matrix early, test on staging, and ship during a quiet traffic window. You’ll keep equity, avoid chaos, and end up with URLs you’re happy to share in an email-always a good sign you got them right.

Orion Fairbanks

Orion Fairbanks

Author

I am a seasoned IT professional specializing in web development, offering years of experience in creating robust and user-friendly digital experiences. My passion lies in mentoring emerging developers and contributing to the tech community through insightful articles. Writing about the latest trends in web development and exploring innovative solutions to common coding challenges keeps me energized and informed in an ever-evolving field.

Write a comment