Hello ANNA!!
On-Page SEO

URL Structure for SEO: How to Name Pages, Folders and Slugs

Here is an unpopular opinion: URLs matter less for rankings than most SEO checklists suggest, and more for long-term sanity than most people realise. A keyword in the slug gives a small nudge at best. But a messy URL scheme makes analytics harder, causes duplicate content, and eventually forces a migration that can cost you months of traffic. So the goal is not a "perfectly optimised" URL. It is a predictable one you will never need to change.

What a good URL looks like

Compare these two for the same product page:

  • https://example.com/index.php?route=product&id=4412&cat=19
  • https://example.com/bedsheets/block-print-king-cotton/

The second tells a person, before they click, what the page is and where it sits. It is easy to share on WhatsApp, easy to read in a report, and it gives Google a little context. That is about all a URL needs to do.

Rules for slugs

Keep them short and descriptive

Use the main topic in a few words. For a post titled "How to Start a Home Bakery in India Without a Big Budget", a slug of /start-home-bakery-india/ works. You don't need every word from the title.

Use hyphens, lowercase, and plain ASCII where you can

Google treats hyphens as word separators. Underscores join words together, so home_bakery may be read as one token. Uppercase letters create risk because some servers treat /Bakery/ and /bakery/ as different pages. Non-English slugs, such as Hindi characters, work technically, but they turn into long percent-encoded strings when copied, so many Indian sites stick to transliterated English slugs.

Drop stop words when they add nothing

"a", "the", "and", "of" can usually go. Keep them if removing them changes the meaning.

Avoid dates in blog URLs

/2023/05/best-budget-phones/ makes an article look old the moment the year changes, and it locks you in. If you update the post next year, either the URL lies or you redirect. Evergreen slugs like /best-budget-phones/ let you keep improving one page.

Don't stuff keywords

/best-cheap-running-shoes-buy-running-shoes-online/ looks spammy and gains nothing. One clear phrase is enough.

Folders and hierarchy

Folders, the parts between slashes, should reflect how your site is actually organised:

Site typeExample structure
Blog/blog/title-tags-guide/
Service business/services/gst-filing/, /locations/pune/
Shopify store/collections/bedsheets/, /products/block-print-king/
SaaS/features/invoicing/, /integrations/tally/

Keep depth reasonable. Two or three levels is plenty for most sites. /shop/home/bedroom/linen/sheets/cotton/king/product-name/ gives you nothing that /bedsheets/block-print-king/ doesn't, and it breaks as soon as you reorganise categories.

That point is worth stressing for ecommerce. If a product appears in several categories, avoid putting the category in the product URL, or make sure one canonical version exists. Otherwise the same product lives at three URLs.

Parameters, filters and tracking codes

Parameters like ?colour=blue&size=xl&sort=price are normal on shops and listing sites. The problem is that every combination can become a separate URL for Google to crawl. A few defences:

  • Point filtered and sorted pages to the main category with a canonical tag, unless a filter is a real search target (for example, "blue cotton bedsheets" might deserve its own indexable page).
  • Don't link internally to URLs with UTM tracking codes. Use those only in campaigns.
  • Keep session IDs out of URLs entirely.

The duplicate content guide covers parameter problems in more detail.

Technical consistency

Pick one version of each of these and redirect the rest:

  • HTTPS, not HTTP.
  • www or non-www.
  • Trailing slash or no trailing slash. Google treats /page and /page/ as different URLs. Either is fine; mixing them is not.

Check your sitemap and internal links use the chosen format. A sitemap generator helps if your CMS does not create a clean one.

Should you change existing URLs?

Usually not, if they work. Changing a URL means a 301 redirect, a period of fluctuation while Google processes it, updating internal links, and losing any backlinks from sites that won't update. A slightly ugly but stable URL is better than a pretty one that cost you rankings.

Change URLs when:

  • They contain session IDs or parameters that create duplicates.
  • They include dates on content you plan to keep updating.
  • You are migrating platforms anyway.
  • The slug is actively misleading (the page was rewritten for a different topic).

When you do change them, 301 redirect old to new, one to one, update internal links rather than relying on the redirect, and watch Search Console for crawl errors over the next few weeks.

A quick audit

Crawl your site or export URLs from your CMS and look for:

  1. Uppercase letters or underscores.
  2. Multiple URLs for the same content.
  3. Very long slugs (anything you couldn't read aloud comfortably).
  4. Internal links pointing to redirected URLs.

URL structure is the skeleton that your internal linking strategy hangs on, so the two are worth planning together. Before you publish your next page, decide its folder and slug on paper, and ask whether you would still be happy with it in five years.

FAQ

URL Structure for SEO: How to Name Pages, Folders and Slugs: common questions

Does having the keyword in the URL help rankings?

A little, mostly because it reinforces what the page is about and can be bolded in search results. It is a minor factor. Content and links matter far more, so don't change working URLs just to add a keyword.

Should I use a trailing slash?

Either style is fine for SEO. What matters is consistency: choose one, redirect the other, and use the chosen format in your sitemap and internal links.

How long can a URL be?

There is no practical ranking limit, but shorter URLs are easier to share and read. A slug of three to six words is a sensible habit for most pages.

Is it a problem if Shopify adds /products/ and /collections/ to URLs?

No. Those fixed folders are standard and plenty of Shopify stores rank well with them. Focus on clean product handles and on making sure product pages linked from collections use the canonical URL.

Will changing URLs drop my rankings?

It can cause a temporary dip even with proper 301 redirects, and you may lose some value from external links that never update. That is why URL changes need a clear reason beyond tidiness.

Related guides