How to Write an SEO Friendly URL: Rules, Structure and Best Practices

How to Write an SEO Friendly URL

Your URL is one of the first things Google reads about a page — and one of the first things a user sees before deciding whether to click a search result. Writing SEO friendly URLs is a small but consistent part of technical SEO that compounds across every page on your website. 

A well-structured URL communicates relevance to Google, builds trust with users, and contributes to your page’s ranking potential. A poorly structured URL does the opposite — confusing crawlers, reducing click-through rates, and creating maintenance problems as your site grows.

What Makes a URL SEO Friendly

An SEO friendly URL has four qualities simultaneously. It is readable to a human who has never visited your site. It is descriptive of the page’s content. It includes the target keyword. And it is as short as possible while still being informative.

A URL like prablaymarketing.com/p=4827?cat=12&ref=home fails all four criteria. A URL like prablaymarketing.com/what-is-seo-friendly-url/ passes all four. The second URL tells both Google and the user exactly what the page covers before they visit it.

Use Your Target Keyword in the URL

Your primary target keyword should appear in the URL slug — the part of the URL after your domain name. This is one of the clearest and most direct relevance signals available for any page.

When Google reads a URL, it uses the words in the slug as an explicit signal about what the page covers. A page at /local-seo-services/ has a stronger relevance signal for local SEO queries than a page at /services/s1/. Furthermore, when someone links to your page using only the URL as anchor text — a common pattern in forums, social media, and casual mentions — the words in your URL become the anchor text, passing keyword-relevant signals back to your page.

Include the keyword naturally and precisely. For this blog post, the target keyword “how to write an SEO friendly URL” maps to the slug /how-to-write-an-seo-friendly-url/ — keyword present, readable, descriptive.

Use Hyphens to Separate Words

Always use hyphens to separate words in your URL slug. Never use underscores, spaces, or no separator at all.

Google’s algorithm treats hyphens as word separators. A URL slug of seo-friendly-url is read as three distinct words — seo, friendly, url. In contrast, seo_friendly_url with underscores is read as a single compound string, not three words. Spaces encoded as %20 produce ugly, unreadable URLs. Running words together without separators — seofriendlyurl — is unreadable to both humans and crawlers.

Hyphens are the universal standard for URL word separation. Every major CMS uses hyphens by default for a reason. Follow this convention without exception.

Keep URLs Short and Descriptive

Shorter URLs perform better than longer ones in both user trust and SEO. Research from Backlinko analysing millions of search results found a clear negative correlation between URL length and ranking position — shorter URLs rank higher on average.

Short URLs are easier to read, easier to remember, easier to share, and less likely to break in emails or messages. They convey confidence — a clean URL looks like the canonical source of information on a topic.

Remove unnecessary words from your URL slug while preserving keyword meaning. Stop words — a, the, of, and, to, is — can almost always be removed from URLs without changing their meaning or keyword relevance.

For example:

  • what-is-the-difference-between-seo-and-semseo-vs-sem-difference
  • how-to-write-an-seo-friendly-url-for-your-websitehow-to-write-an-seo-friendly-url
  • our-best-local-seo-services-for-small-businesseslocal-seo-services

The shortened versions communicate the same information with fewer characters.

Use Lowercase Letters Only

Always write URL slugs in lowercase. URLs are case-sensitive on most servers. /Local-SEO-Services/, /local-seo-services/, and /LOCAL-SEO-SERVICES/ are technically three different URLs on a case-sensitive server.

Mixed-case URLs create duplicate content risks when different systems link to the same page using different capitalisation conventions. Lowercase-only URLs eliminate this risk entirely and are the universal standard for web URLs.

If your site has existing mixed-case URLs, implement 301 redirects from the mixed-case versions to their lowercase equivalents and update all internal links. This is a technical SEO maintenance task worth including in any comprehensive site audit.

Avoid Special Characters and Numbers

Special characters — !, @, #, $, %, ^, &, * — create URL encoding issues and produce ugly, untrustworthy-looking links. Avoid them entirely.

Numbers in URLs create ambiguity and reduce descriptiveness. A URL like /top-10-seo-tips/ will become outdated when you update the post to 15 tips. A URL like /seo-tips/ remains accurate regardless of how many tips the post contains.

The exceptions are years in date-specific content — /google-algorithm-updates-2026/ — and numbers that are integral to the topic — /h1-h2-h3-header-tags/. Use numbers sparingly and only when they genuinely serve descriptive clarity.

URL Structure and Site Architecture

Your URL structure should reflect your site’s content hierarchy. A well-organised URL structure communicates your site architecture to both Google and visitors.

For a service business website:

domain.com/services/                    → services index

domain.com/services/local-seo/          → specific service

domain.com/services/technical-seo/      → specific service

domain.com/blog/                        → blog index

domain.com/blog/what-is-anchor-text/    → specific post

This flat, logical hierarchy tells Google how pages relate to each other. It supports your topical authority building by showing clear topical clusters within the URL structure.

Avoid deeply nested URL structures that bury pages 5 or 6 levels deep — /category/subcategory/sub-subcategory/topic/subtopic/page/ — as these are both harder for crawlers to process efficiently and less trustworthy to users.

Avoid Dynamic URL Parameters Where Possible

Dynamic URLs generated by databases — ?id=847&cat=3&sort=price_asc — are less effective for SEO than clean static-format URLs for several reasons.

They provide no keyword signal. They look untrustworthy to users. They create massive duplicate content risks when the same content is accessible at multiple parameter combinations. They waste crawl budget as Googlebot tries to crawl endless parameter variations of the same underlying content.

Most modern CMS platforms — WordPress, Shopify, Magento — can be configured to generate clean static-format URLs automatically. In WordPress, set your permalink structure to /%postname%/ under Settings > Permalinks. This produces clean, descriptive URLs for all posts and pages automatically.

For ecommerce platforms where some dynamic parameters are unavoidable — filter and sort parameters, session IDs, pagination — use URL parameter handling in Google Search Console to tell Google which parameters to ignore and implement canonical tags on parameterised pages pointing to their clean canonical URL.

Handling Existing Poor URLs: To Change or Not to Change

Changing existing URLs is a significant decision that requires careful risk management. Changing a URL breaks any existing links pointing to the old URL and removes the page’s accumulated ranking history unless 301 redirects are correctly implemented.

Change the URL when:

  • The current URL is completely non-descriptive (parameter-based or auto-generated IDs)
  • The current URL contains keywords that are now wrong or misleading
  • The page has few or no external backlinks and minimal organic traffic to protect
  • You’re doing a comprehensive site migration with planned redirects

Leave the URL unchanged when:

  • The page ranks well and has significant organic traffic
  • The page has valuable external backlinks pointing to the current URL
  • The URL change benefit is marginal — removing one stop word from an already clean URL

When you do change a URL, always implement a 301 permanent redirect from the old URL to the new one. Update all internal links site-wide to use the new URL directly. Reach out to owners of significant external backlinks and ask them to update their links to the new URL. Monitor Google Search Console for any unexpected errors after the change.

This URL management process is part of any thorough SEO audit checklist and should be approached systematically rather than page by page without a plan.

URL Best Practices Quick Reference

  • Include target keyword in slug
  • Use hyphens to separate words
  • Use lowercase letters only
  • Remove stop words where possible
  • Avoid special characters and unnecessary numbers
  • Keep slugs under 75 characters where possible
  • Use static URL formats rather than dynamic parameters
  • Implement 301 redirects whenever URLs change
  • Maintain consistent trailing slash or no-trailing-slash convention site-wide

Frequently Asked Questions (FAQs)

  1. Does including keywords in URLs directly improve rankings?

Yes, as a minor but consistent signal. Google uses URL words as a relevance indicator for keyword matching. Including your target keyword in the URL slug contributes a small but real relevance signal. More importantly, it improves click-through rates by showing users the keyword they searched for in the URL before they click — which indirectly supports rankings through better CTR signals.

  1. Should I include dates in my URLs?

Generally no. Dates in URLs — /2024/08/seo-guide/ — make content look outdated as time passes, reducing click-through rates for evergreen content. They also complicate URL management when content is updated. The exception is genuinely time-bound content — /google-algorithm-updates-2026/ — where the year is intrinsic to the content’s meaning and value.

  1. How long should a URL slug be?

Keep slugs under 75 characters where possible. There is no hard character limit for URL length in Google’s guidelines, but analysis of top-ranking pages consistently shows shorter slugs correlating with higher rankings. Aim for the minimum length that clearly communicates the page topic — typically 3 to 6 words.

  1. Does the domain name affect SEO beyond the slug?

Yes. Your domain name carries brand and topical signals. An exact match domain — localseoservices.com — carries keyword signals in the domain itself. Subdomains — blog.domain.com — are treated by Google as separate sites from the main domain in some contexts, which can dilute authority compared to subdirectories — domain.com/blog/. Subdirectory structure is generally preferred over subdomains for SEO purposes.

  1. Should I use www or non-www in my URLs?

Both are equally valid for SEO. Choose one and implement 301 redirects from the other to your preferred version. Set your preferred domain — www or non-www — in Google Search Console and ensure your canonical tags consistently reference your chosen format. Inconsistency between www and non-www creates duplicate content risks that the 301 redirect and canonical configuration resolve.

  1. Do URL changes reset a page’s SEO value?

A correctly implemented 301 redirect transfers the large majority of a page’s accumulated authority to the new URL. Over time — typically 3 to 6 months — the new URL consolidates the transferred authority and rankings stabilise. Without a 301 redirect, a URL change effectively creates a new page from scratch, losing all accumulated ranking signals permanently.

What do you think?
Leave a Reply

Your email address will not be published. Required fields are marked *

What to read next