URL Structure Best Practices
What This Means
URL structure refers to how your website's web addresses are formatted and organized. Good URL structure uses clear, descriptive, keyword-rich URLs that are easy for both users and search engines to understand. Poor URL structure uses cryptic parameters, session IDs, random strings, or overly complex paths that confuse users, harm SEO, reduce click-through rates, and make site maintenance difficult.
Good vs Bad URL Structure
Bad URL Examples:
❌ https://example.com/page.php?id=123&cat=45&sort=asc
❌ https://example.com/product.aspx?productID=AB-2837492
❌ https://example.com/index.php?option=com_content&view=article&id=47
❌ https://example.com/2025/01/15/p=123
❌ https://example.com/category/subcategory/sub-sub/sub-sub-sub/product
Good URL Examples:
✅ https://example.com/products/blue-widget
✅ https://example.com/blog/seo-tips-2025
✅ https://example.com/services/web-design
✅ https://example.com/about-us
✅ https://example.com/contact
Impact on Your Business
SEO Benefits of Good URLs:
- Higher rankings - Keywords in URLs are ranking signals
- Better CTR - Users more likely to click readable URLs
- Easier sharing - Memorable URLs shared more often
- Link equity - Clear structure helps PageRank flow
- Breadcrumbs - Logical hierarchy enables breadcrumb navigation
User Experience Impact:
- Trust - Professional URLs build credibility
- Understanding - Users know where they're going
- Memorability - Easy to remember and type
- Shareability - Can be shared verbally or in print
Real-World Stats:
- URLs with keywords rank 1.5x better on average
- Short URLs (< 60 chars) get 2.5x more clicks
- Clean URLs increase social shares by 30%
- 76% of users check URL before clicking
How to Diagnose
Method 1: Manual URL Review
Check your URLs for these issues:
❌ Session IDs:
example.com/product?sessionid=abc123xyz
❌ Unnecessary parameters:
example.com/page?tracking=email&source=newsletter&medium=cpc
❌ Dates in product URLs:
example.com/2025/01/15/blue-widget
❌ Auto-generated IDs:
example.com/p/847392
❌ File extensions:
example.com/about-us.html
example.com/services.php
❌ Underscores:
example.com/blue_widget (use hyphens instead)
❌ Capital letters:
example.com/Products/Blue-Widget (use lowercase)
❌ Too many subdirectories:
example.com/cat/subcat/subsubcat/product
❌ Non-descriptive:
example.com/page1
example.com/item-a
Method 2: Google Search Console
- Open Search Console
- Go to Performance report
- Sort by Impressions then CTR
- Compare CTR of different URL patterns
Analyze:
- Do clean URLs get higher CTR?
- Do parameter-heavy URLs perform worse?
- Which URL patterns get more clicks?
Method 3: Screaming Frog URL Analysis
- Crawl site with Screaming Frog
- Export URL list
- Analyze patterns
Check For:
- URL length (over 60 characters)
- Number of folders (over 3 levels)
- Parameters and query strings
- Dynamic vs static URLs
- Duplicate content from URL variations
Method 4: Analytics URL Report
- Go to Behavior → Site Content → All Pages
- Look for:
- Multiple URLs for same content
- Parameter variations
- Session IDs in URLs
Example Problem:
Same content, different URLs:
/product?id=123
/product?id=123&sort=price
/product?id=123&sessionid=xyz
/product?id=123&utm_source=email
Method 5: Competitor Analysis
Compare your URLs to competitors:
Your site:
example.com/p?id=12345
Competitor site:
competitor.com/products/blue-widget
Result: Competitor's URL is more SEO-friendly
General Fixes
Fix 1: Use Descriptive Keywords
Make URLs readable and keyword-rich:
❌ BEFORE:
example.com/product?id=847
✅ AFTER:
example.com/products/blue-widget
❌ BEFORE:
example.com/blog/post.php?p=123
✅ AFTER:
example.com/blog/seo-best-practices-2025
Fix 2: Keep URLs Short and Simple
Aim for under 60 characters:
❌ TOO LONG:
example.com/category/subcategory/sub-subcategory/products/blue-widgets-for-sale-online-buy-now
✅ GOOD LENGTH:
example.com/products/blue-widget
❌ TOO MANY LEVELS:
example.com/home/shop/products/tools/power-tools/drills/cordless/item
✅ FLAT STRUCTURE:
example.com/products/cordless-drill
Fix 3: Use Hyphens, Not Underscores
Separate words with hyphens:
❌ UNDERSCORES:
example.com/blue_widget
example.com/seo_best_practices
✅ HYPHENS:
example.com/blue-widget
example.com/seo-best-practices
Why: Google treats hyphens as word separators, but underscores as word connectors:
blue-widget= "blue" + "widget"blue_widget= "bluewidget" (one word)
Fix 4: Use Lowercase Letters
Avoid capital letters:
❌ MIXED CASE:
example.com/Products/Blue-Widget
example.com/About-Us
✅ LOWERCASE:
example.com/products/blue-widget
example.com/about-us
Why:
- URLs are case-sensitive on some servers
Example.com/Page≠example.com/page- Can create duplicate content issues
Fix 5: Avoid Unnecessary Parameters
Remove tracking and session parameters:
❌ PARAMETERS:
example.com/product?id=123&sessionid=xyz&ref=email&source=newsletter
✅ CLEAN:
example.com/products/blue-widget
# Use canonical tag for parameter variations
<link rel="canonical" href="https://example.com/products/blue-widget">
Handle necessary parameters:
# Search/filter parameters are sometimes necessary
example.com/search?q=blue+widget
example.com/products?category=tools&sort=price
# Use rel="canonical" to consolidate:
<link rel="canonical" href="https://example.com/products">
Fix 6: Create Logical Hierarchy
Organize URLs by category:
✅ GOOD HIERARCHY:
example.com/
├── products/
│ ├── tools/
│ │ ├── hammer
│ │ └── screwdriver
│ └── materials/
│ ├── wood
│ └── metal
├── blog/
│ ├── diy-tips
│ └── tool-reviews
└── about-us
❌ FLAT (too many top-level pages):
example.com/hammer
example.com/screwdriver
example.com/wood
example.com/metal
example.com/diy-tips
Fix 7: WordPress Permalink Structure
Optimize WordPress permalinks:
// Settings → Permalinks
❌ DEFAULT (BAD):
example.com/?p=123
❌ DATE-BASED (BAD for timeless content):
example.com/2025/01/15/post-title
✅ POST NAME (GOOD):
example.com/post-title
✅ CUSTOM WITH CATEGORY (BETTER):
example.com/category/post-title
// Custom structure:
/%category%/%postname%/
For products (WooCommerce):
Settings → Permalinks → Product permalink base
✅ Custom base:
/products/%productname%/
Result: example.com/products/blue-widget
Fix 8: Handle URL Changes with 301 Redirects
When restructuring URLs:
# .htaccess - 301 redirects
Redirect 301 /old-url-structure /new-url-structure
Redirect 301 /product.php?id=123 /products/blue-widget
Redirect 301 /category/page.html /category/page
# Bulk pattern redirects
RedirectMatch 301 ^/product\.php\?id=(.*)$ /products/$1
RedirectMatch 301 ^/(.*).html$ /$1
Nginx redirects:
# nginx.conf
server {
# Remove .html extension
rewrite ^/(.*)\.html$ /$1 permanent;
# Redirect old product structure
rewrite ^/product\.php\?id=(.*)$ /products/$1 permanent;
}
Platform-Specific Guides
Detailed implementation instructions for your specific platform:
| Platform | Troubleshooting Guide |
|---|---|
| Shopify | Shopify URL Structure Guide |
| WordPress | WordPress URL Structure Guide |
| Wix | Wix URL Structure Guide |
| Squarespace | Squarespace URL Structure Guide |
| Webflow | Webflow URL Structure Guide |
Verification
After optimizing URL structure:
Test 1: Check New URLs
- Review sample URLs from site
- Verify they're:
- Descriptive
- Lowercase
- Hyphen-separated
- Under 60 characters
- No unnecessary parameters
Test 2: 301 Redirects Working
# Test old URLs redirect properly
curl -I https://example.com/old-url
# Should show:
HTTP/2 301
location: https://example.com/new-url
Test 3: Google Search Console
- Submit updated sitemap
- Monitor Coverage report
- Check for indexing of new URLs
- Verify old URLs redirect properly
Test 4: Analytics
- Monitor organic traffic
- Check bounce rate on new URLs
- Compare CTR before/after
- Track conversions
Common Mistakes
- Changing URLs without 301 redirects - Loses all SEO value
- Using stop words - "and", "the", "of" add no value
- Keyword stuffing -
/blue-widget-buy-blue-widget-salelooks spammy - Inconsistent structure - Pick a pattern and stick with it
- Dynamic parameters - Session IDs in URLs
- Not planning hierarchy - Restructure causes massive redirect work
- Ignoring mobile - Long URLs hard to read on mobile
- Special characters - Avoid &, %, #, spaces
URL Structure Checklist
Before creating new URLs:
- Descriptive and keyword-rich
- Under 60 characters
- All lowercase letters
- Hyphens (not underscores) separate words
- Logical category hierarchy
- No unnecessary parameters
- No file extensions (.html, .php)
- HTTPS (not HTTP)
- No special characters or spaces
- Easy to read and remember