To optimize your website's URL structure for SEO, use short, readable, lowercase URLs with words separated by hyphens. Group related pages in folders that mirror how your topics fit together. Keep 1 URL per page, keep filter and tracking parameters out of the index, and change existing URLs only with a clear reason and a 301 redirect.
URL structure has a small direct effect on rankings. Its larger effect is indirect. A logical URL structure makes a site easier for search engines to crawl, prevents duplicate content issues and gives users a clear idea of where they are. That makes it a small but lasting part of any SEO strategy.
What is URL structure?
URL structure is the pattern your website uses to name and organize its page addresses. A URL has a protocol (https://), a domain name (example.com), an optional folder path (/running-shoes/), and a slug that names the page (trail-running-shoes). Some URLs also carry parameters after a ?, such as ?color=black.
A good URL structure makes the path predictable for users and search engines. Someone who sees example.com/running-shoes/trail/ should be able to guess what the page sells and where it sits on the site. The same logic applies to the keyword each page targets, so decide those first with how to look for keywords on a website.
Does URL structure affect SEO?
Yes, but less than most guides suggest. Google's SEO starter guide says keywords in a domain name or URL path "alone have hardly any effect" on ranking beyond appearing in breadcrumbs. Keywords in URLs will not lift a weak page.
URL structure still matters for 3 reasons Google documents.
- Users. Google says to include words in the URL that may be useful for users, and that parts of the URL can show as breadcrumbs in search results.
- Crawling. The same guide says using folders to group similar topics "can help Google learn how often the URLs in individual directories change."
- Duplicate URLs. Google's URL structure guidance warns that parameters, filters and session IDs can create huge numbers of URLs for the same content.
So the honest answer is mixed. A clean URL rarely moves rankings on its own. A messy URL structure can waste crawling, split signals and create confusion for search engines, which can lead to duplicate content issues across a whole catalog.
URL structure best practices for SEO-friendly URLs
These are the URL best practices for SEO we apply on every site. The first 6 come straight from Google's guidance. The rest are our recommendations.
- Use readable words. Google recommends readable words "rather than long ID numbers."
/trail-running-shoesbeats/p?id=48213. - Separate words with hyphens. Google recommends a hyphen instead of an underscore to separate words in your URL. Hyphens keep each word readable to users and search engines.
- Use lowercase letters. Google states its URL handling is case sensitive. Mixed case can create duplicate URLs.
- Write in your audience's language. Google advises using words in your audience's language and percent-encoding non-ASCII characters.
- Avoid fragments for content. Google generally doesn't support URL fragments (
#section), so do not use them to load different content. - Use standard parameters. If you need parameters, use
key=valuepairs joined with&, as Google recommends. - Keep URLs short and concise. Short URLs are easier to read, share and remember. Cut stop words like "and" or "the" when the URL slug stays clear without them.
- Put the primary keyword in the slug. Keywords in the URL help users and breadcrumbs in search engine results, even though the ranking effect is small.
- Keep the folder depth shallow. 2 to 3 levels covers most sites.
- Leave out dates and changing details. A URL should survive a content update.
Your title tag and URL should describe the same page. For the title side, see our meta title and description best practices.
How to build a hierarchical structure that mirrors your topics
Folders work best when they mirror a topical silo: a group of pages about 1 subject, with supporting pages linking up to the page that sells. The folder path then shows search engines and users how your topics fit together.
Here is how we structure a store or service site:
| Page type | Example URL | Role in the silo |
|---|---|---|
| Main category | /running-shoes/ |
Main commercial page for the topic |
| Subcategory | /running-shoes/trail/ |
Narrower commercial page under the category |
| Product | /products/trail-shoe-model-name |
Sells 1 item; kept flat so it can sit in many categories |
| Service | /services/ducted-air-conditioning/ |
Main commercial page for a service |
| Location service | /services/ducted-air-conditioning/denver/ |
Location version of that service |
| Supporting guide | /blog/how-to-choose-trail-running-shoes |
Answers a question and links up to the category |
We keep blog posts in a flat /blog/ folder rather than nesting them under categories. Posts often support more than 1 category, and a flat blog path lets you link a post to whichever page it supports without moving it. The silo then lives in the internal links: every supporting post links up to the category it supports. Every link is a vote, so point the votes at the pages that sell.
Product URLs follow the same reasoning. Many platforms, including Shopify, can generate a product URL under each collection it belongs to. Use 1 canonical product URL and link to it everywhere.
How to handle URL parameters and faceted URLs in ecommerce
Faceted navigation is the set of filters on a category page: size, color, brand, price. Each filter combination can create a new URL. Google's faceted navigation guidance says this leads to overcrawling and slower discovery of new, useful URLs.
Decide which filter pages deserve to rank. A filter that matches real search demand, such as "black trail running shoes", can become its own subcategory with a clean URL, unique copy and links. Most others, such as sort order, price sliders and multi-filter combinations, should stay out of the index.
For filter URLs you do not need indexed, Google lists these options.
- Block crawling in robots.txt. Google suggests disallowing faceted URLs while allowing item pages and 1 unfiltered listing page.
- Use URL fragments for filters. Google generally ignores fragments, so fragment-based filters do not create crawlable URLs.
For filter URLs you do need crawled, Google recommends these steps.
- Use the standard
&separator and keep filters in a consistent order. - Return a 404 when a filter combination has no results.
- Add
rel="canonical"pointing to the main version. Google notes canonical and nofollow hints are "generally less effective in the long term" than blocking.
Session IDs, sort parameters and tracking tags belong in the same bucket. Google advises avoiding session IDs in URLs where possible and trimming unnecessary parameters.
Should you change existing URLs and redirect them?
Change an existing URL only when the gain is clear. Every URL change carries risk: rankings can fluctuate while Google processes the redirect, and links pointing at the old URL pass through a redirect instead of landing directly. A URL that is a bit long or has an underscore is rarely worth changing on its own.
Good reasons to change URLs include a site migration, merging duplicate pages, fixing a structure that creates endless duplicates, or escaping a URL with a damaged link profile.
A baseball equipment store we worked with had the last problem. Its pitching machines collection kept dropping in and out of rankings. The page content was not the cause. Exact-match anchor spam pointing at that URL was. We moved the collection to a fresh URL and built natural links to it. We redirected the original address only once the new page ranked. A year later the page still ranks and shows in AI Overviews. The move was about escaping spammy anchors, and the order mattered: the redirect came last. It is a fix for a link problem and no reason to change healthy URLs.
How to change a URL safely
- Map every old URL to the new URL before you change anything.
- Add a permanent 301 redirect from each address directly to its replacement. Google's redirects documentation says a permanent redirect signals that the target should be canonical.
- Avoid redirect chains. Point the old URL straight to the final URL.
- Update internal links so they point to the new URL instead of the redirect.
- Update your XML sitemap with the new URLs and submit it in Search Console.
- Keep redirects in place long term. Google's site move guidance says to keep them "for as long as possible," generally at least 1 year.
- Monitor rankings and Search Console for the moved pages over the following weeks.
Common URL structure and URL slug mistakes
- Multiple URLs for 1 page.
http,https,www, trailing slashes and uppercase versions should all resolve to 1 canonical URL. - Indexable filter and sort URLs. These produce near-duplicate pages at scale.
- Underscores and spaces. Use hyphens.
- Keyword-stuffed slugs.
/shoes-running-shoes-best-running-shoesreads as spam. - Deep nesting. 5 folders deep makes URLs long and hard to scan.
- Changing URLs with every redesign. Each change sends links and users through a redirect and risks lost signals.
- Broken relative links. Google recommends root-relative links to avoid creating bogus URLs.
Some sites also confuse their site name with page titles, which then leaks into slugs. Our guide to website title vs article title explains which name belongs where.
Get your site structure reviewed
If your URLs, folders and internal links have grown without a plan, a structured review usually finds quick wins. Our on-page SEO services cover URL structure, internal linking and page targeting together.