A URL is the address of a page, and its structure is how you organise those addresses across a site. Its direct effect on rankings is small. Its effect on crawling, and on whether someone clicks your result, is larger.
This covers what Google actually documents, the rules worth following, the WordPress settings that decide your structure, and the one situation where changing URLs is genuinely dangerous.
What Google documents, in its own words
Rather than repeat the usual list of opinions, here is what Google actually publishes about URL structure.
- Use words, not numbers. Google says: “When possible, use readable words rather than long ID numbers in your URLs.” It also recommends using words in your audience’s own language.
- Hyphens, not underscores. Google prefers hyphens and says underscores are not recommended, “for historical reasons”.
- URLs are case sensitive. If your server treats variations the same way, you should still use one consistent case.
- Percent encoding. Reserved characters should be percent-encoded, and non-ASCII characters must be. Unreserved ASCII characters may be left as they are.
- Fragments do not work for changing content. Sites using JavaScript should use the History API instead.
Source for all of the above: Google Search Central.
Notice what is absent from that list. Google does not say shorter URLs rank better, or that keywords in URLs are a ranking factor. Those are inferences people make, not things Google documents.
How much do URLs actually affect rankings?
Very little, directly. A keyword in a URL is a weak signal at best, and no sensible test has shown it moving a page on its own.
Where URLs genuinely matter is everywhere else. They appear in the search result as part of the attribution, so a readable one is easier to trust and click. They get shared and pasted, where a clean address survives and a long one gets truncated. And they are how your site is organised, which affects what gets crawled.
So treat URL structure as hygiene and usability rather than a ranking lever. The practical consequence of that is important: do not break a working URL to make it prettier. The small gain is not worth the risk, and the risk is covered below.
The rules worth following
- Readable words, hyphen separated, lowercase. This covers most of it.
- Short, but not mutilated. Cut filler words, keep the ones that carry meaning.
/url-structure-seo/beats both/how-to-structure-your-urls-for-better-seo-in-2026/and/url/. - No dates. A URL containing 2024 looks stale in 2026 even after you update the page, and you cannot fix it without a redirect.
- Subfolders over subdomains for content that belongs to the same site. A subdomain is treated as a more separate thing, which splits the strength you are trying to build.
- Match the structure to the site, not to a theory. A ten-page site does not need a folder hierarchy. A thousand-page site does.
- Pick one and keep it. Consistency is worth more than whichever convention you chose.
Parameters, and the infinite URL problem
This is the part that causes real damage and gets the least coverage.
Google names three specific issues. Irrelevant parameters, such as referral or sort parameters, generate large numbers of duplicate URLs, and Google advises trimming unnecessary ones and possibly blocking problem URLs with robots.txt. Session IDs in URLs should be avoided in favour of cookies.
The third is the dangerous one: infinite spaces. Google specifically cites calendars with no date limit, additive filters, and broken parent-relative links as ways a site can generate endless URL combinations. Its suggested fixes are nofollow on future calendar links and root-relative rather than parent-relative links.
That matters because a crawler that spends its visits on an endless calendar is not spending them on your actual pages. If your indexed count is far below your published count, this is one of the things worth checking, alongside the reasons in crawled, currently not indexed.
WordPress: the settings that decide your URLs
If you run WordPress, the platform has already made several of these decisions for you, and they sit in one settings screen.
Permalinks. Settings then Permalinks. The default on some installs is /?p=123, which is the ID-number form Google explicitly advises against. Post name is the right choice for a blog, giving you /your-post-title/. The Day and name option bakes a date into every URL, which is the problem described above.
The category base. WordPress inserts /category/ into archive URLs by default. You can change or remove it in the same screen, though it is cosmetic and worth leaving alone on an established site.
Slugs are editable per post, and should be. WordPress generates the slug from your title, so a long headline becomes a long URL. Shorten it before publishing, because changing it afterwards means a redirect. Our SEO slug generator applies the rules above to a title and flags the problems before you publish.
Attachment pages. WordPress creates a URL for every uploaded image, and those are thin pages that nobody searches for. Turning them off is covered in our note on WordPress attachment pages.
Changing URLs without losing what you have
Changing a permalink structure on a live site rewrites every URL at once. Every link anyone has ever made to you, every ranking, and every piece of Search Console history is attached to the old addresses.
If you still need to do it, the order matters.
- Export the current URLs first. Take the sitemap and a Search Console performance export by page. Without this you cannot build a complete redirect map, and you cannot tell afterwards what you lost.
- Build the redirect map before changing anything. Every old URL to exactly one new URL, no chains, no redirecting everything to the homepage.
- Use 301, not 302. Permanent, because it is.
- Change the structure, then test a sample immediately. Pick ten old URLs across different sections and confirm each lands where it should.
- Update internal links. Leaving your own links pointing at redirects works, and it is sloppy and slow.
- Watch Search Console for a month. Expect a dip. Watch the Not found count and the indexed count, not just traffic.
Keep the redirects permanently. There is no point at which it becomes safe to remove them, because old links never expire.
A short checklist
Run through this when you set a site up, and again whenever you add a new section. It sits alongside the wider technical SEO checklist.
- Readable words rather than ID numbers
- Hyphens between words, never underscores
- Lowercase throughout, consistently
- No dates, no session IDs, no stop-word padding
- Subfolders rather than subdomains for the same site
- Parameters trimmed, infinite spaces blocked
- Slugs shortened before publishing, not after
- Existing URLs left alone unless there is a real reason
Frequently asked questions
Does URL structure affect SEO?
Only a little directly. Google documents requirements for crawlable URLs and recommends readable words over ID numbers, but it does not say that keywords in URLs are a ranking factor or that shorter URLs rank better. The real value is in crawling, in how the result looks when someone decides whether to click, and in keeping a site organised.
Should I use hyphens or underscores in URLs?
Hyphens. Google states a preference for hyphens and says underscores are not recommended, for historical reasons. This is one of the few URL conventions Google is explicit about rather than leaving to inference.
What is the best permalink structure for WordPress?
Post name, which produces a clean address from the post slug. Avoid the plain setting that produces an ID number in the URL, since Google specifically advises using readable words instead. Avoid Day and name too, because a date in the URL makes the page look stale after an update and cannot be removed without a redirect.
Should I change my URLs to make them better?
Usually not. Changing a URL means every existing link, ranking and piece of history is attached to an address that no longer serves the page, and a prettier URL is a small gain against that risk. If you must, export your current URLs first, build a complete one-to-one 301 redirect map before changing anything, and keep those redirects permanently.
Are subdomains or subfolders better for SEO?
Subfolders, for content that belongs to the same site. A subdomain tends to be treated as a more separate property, which splits the strength you are trying to concentrate in one place. Subdomains make sense for genuinely separate things, such as a help centre or an app, rather than for sections of the same site.
What are infinite spaces in URLs?
They are endless URL combinations a site generates by accident, and Google names calendars with no date limit, additive filters and broken parent-relative links as the common causes. The problem is that a crawler can spend its visits on these instead of your real pages. Google suggests adding nofollow to future calendar links and using root-relative rather than parent-relative links.
