A good URL is short, readable, lowercase, uses hyphens between words and stays the same for the life of the page. Google says keywords in the URL path have hardly any effect beyond appearing in breadcrumbs, so the point is clarity for people and crawlers, not ranking tricks.
Does URL structure affect rankings?
Barely, and Google is direct about it. Its SEO starter guide says the keywords in a domain name or URL path alone have hardly any effect beyond appearing in breadcrumbs. It also says parts of the URL can be shown in search results as breadcrumbs, and that a URL made only of random identifiers is less helpful to users.
So the useful question is not "how do I fit my keyword in the URL?" It is "can a person, or a crawler, tell what this page is from the address alone?" That framing keeps you away from long, stuffed slugs and toward the few rules that actually matter.
What are the rules worth following?
Google's URL structure guidance gives a short list. Applied to a small site, it comes down to this:
- Use readable words, not IDs.
/blog/url-structure-seobeats/blog/post?id=48213. Google recommends readable words over long ID numbers. - Separate words with hyphens. Google recommends hyphens over underscores, and discourages running words together.
- Keep one case. Google treats
/Appleand/appleas different URLs. Pick lowercase and make the server send everything else to it. - Trim parameters. Sorting, referral and session parameters create many addresses for one page. Google warns that overly complex URLs, especially with multiple parameters, can cause problems for crawlers.
- Never use a fragment to change content. Anything after
#is not treated as a separate page. - Write in your audience's words. If your readers search in another language, use that language in the path.
Google gives no official maximum length. Treat length as a readability test: if you cannot read the URL aloud in one breath, shorten it.
Should the URL mirror your folders?
A folder path such as /blog/technical-seo/ tells people and crawlers where a page sits. It is useful when you have real sections, and pointless when you add folders only to look organized. Google's starter guide says a logical structure helps search engines and users understand how pages relate, and that grouping similar topics into directories can help Google learn how often URLs in a directory change. It suggests this mainly for larger sites with more than a few thousand URLs.
For a site with a few dozen pages, a flat structure is fine. Use a folder only when it names a section a visitor would recognize. The same guide advises against reorganizing quickly, since search engines will likely understand your pages as they are now.
| Page | Better URL | Weaker URL |
|---|---|---|
| Blog post | /blog/what-is-a-canonical-url | /blog/2026/11/24/post-48213 |
| Product category | /shoes/running | /cat.php?c=12&s=price |
| Landing page | /pricing | /Pricing_Page_FINAL |
Should dates and stop words be in the slug?
Leave dates out unless the page is truly tied to a date. A date in the path makes an evergreen post look old and forces a new URL when you refresh it. Stop words such as "the" or "a" are harmless, but dropping them makes slugs shorter. Neither choice is a ranking lever, so decide once and stay consistent. If you update posts regularly, see how to refresh old blog posts without hurting SEO.
What if your URLs are already messy?
Do not rewrite them for tidiness alone. Changing a URL means a redirect, a chance of mistakes and a period where Google must relearn the page. Google advises using a permanent server-side redirect when a URL changes and you are sure it will not be reverted, per its redirects documentation.
Change a URL only when it is actively causing a problem:
- Several parameter versions of one page are being crawled or indexed.
- Uppercase and lowercase versions both resolve, splitting your signals.
- The address is so opaque that nobody can tell what the page is.
When you do change one, redirect the old address to the new one in a single hop and update your internal links to point straight at the new URL. Redirect chains waste crawling and slow visitors, and a 301 redirect is the right type for a permanent move.
How do canonicals fit in?
Even a tidy site ends up with several addresses for one page: with and without a trailing slash, with tracking parameters, over http and https. Pick one version as the preferred address, link to it everywhere and declare it with a canonical URL. Clean structure reduces the number of duplicates you create, but the canonical is what tells Google which one you mean. For the wider problem, read duplicate content and how to fix it.
A quick URL checklist
- Lowercase, hyphen-separated, readable words.
- No session IDs or sorting parameters in links you control.
- One preferred version of each page, set with a canonical.
- Folders only where they name a real section.
- No changes to working URLs without a one-hop 301.
Frequently Asked Questions
Is a keyword in the URL a ranking factor?
Google says keywords in the URL path have hardly any effect beyond appearing in breadcrumbs. Use words that describe the page, but do not stretch a slug to fit extra keywords.
Hyphens or underscores in URLs?
Hyphens. Google recommends them to separate words, and the rule is simple enough to apply sitewide without exceptions.
How long should a URL be?
Google publishes no limit. Aim for a path a person can read and understand at a glance, which usually means three to five words.
Should I change my URLs to include keywords?
Usually no. The redirect work and the relearning period outweigh a small readability gain. Change URLs only to fix real problems such as parameter duplicates.
Does the trailing slash matter?
Not to ranking. What matters is serving one version and redirecting or canonicalizing the other, so the page does not exist at two addresses.