SEO

Subdirectory

Also called Subfolder, directory

A folder path on your main hostname, such as example.com/blog/, that stays part of the same site.

Quick facts: Subdirectory

Category
SEO
Also called
Subfolder, directory
Level
Beginner
Affects
Site structure, internal linking, analytics grouping
Where to see it
Your CMS permalink settings, Google Analytics 4 page path reports, any site crawler
In this article4
  1. How a subdirectory works
  2. Why subdirectories matter
  3. Where subdirectories go wrong
  4. Getting it right

How a subdirectory works

A subdirectory — or subfolder — is a path segment after the hostname: example.com/blog/, example.com/services/seo/. Nothing new is created at the DNS level. The request goes to the same server, over the same certificate, and your content management system decides what to return for that path.

Because everything sits on one hostname, a search engine has no separation to reason about. A folder is not a container with its own reputation; it is part of the same site, and a link pointing into it is a link into your site. That is the whole of the difference from a subdomain, and it is why the folder is usually the right default.

Why subdirectories matter

Folders are how a visitor and a crawler read the shape of a site from the address alone. A path like /seo-services/local-seo/ says what the page is and what it belongs to before anything has loaded. That clarity feeds navigation, breadcrumbs, and the analytics reports where you group pages by path to see which section of the site earns its keep.

They also concentrate rather than divide. A new section launched in a folder starts on the same hostname as everything you have already published, so it is discovered sooner and internal links from existing pages carry weight straight into it. The subdomain versus subfolder decision turns on that point more than any other.

Where subdirectories go wrong

Nesting is the usual problem. Every extra level makes the address longer, makes it harder to say aloud, and tempts teams into building folders that mirror an internal org chart rather than the way customers describe what they want. Depth in the address is not itself a ranking factor, but folders nobody planned tend to come with navigation nobody planned either.

Dated folders age badly. A path with a year in it announces how old the page is whether or not the content has been kept current, and it turns any later reorganisation into a redirect exercise. Category folders bolted on as an afterthought have the same effect, multiplied across everything beneath them.

Getting it right

Decide the folder structure before you publish, built from the topics your customers actually search for, and keep it shallow enough that a person could guess an address. Use lowercase letters and hyphens between words, and leave out words that are only there for search engines — a stuffed path is obvious and does nothing.

Then change folders as rarely as you can. When you must, map every old address to its new one and redirect permanently; renaming a folder touches every page beneath it at the same moment, which is how a small tidy-up turns into a full site migration without anybody calling it one. Keep the pattern consistent across the whole site, because a structure only repays the effort if everything follows it, and update internal links rather than letting them redirect for years.

Do and do not

Do

  • Plan folders around customer topics before you publish
  • Keep paths short, lowercase and hyphenated
  • Redirect every URL beneath a folder you rename

Do not

  • Bury pages several folders deep without a reason
  • Put dates or department names in paths
  • Rename folders once the pages are ranking

Questions people ask about this

How deep should my folders go?

Shallow enough that a person could guess the address and say it aloud without help. Most sites need a section folder and, at most, one level beneath it. Depth in the address is not a ranking factor on its own, but long nested paths usually reveal a navigation problem underneath, and that does affect how easily pages are found.

Should the country or language sit in a folder?

It is a common and workable approach: one hostname with a folder per market, each folder annotated so search engines know which audience it serves. Everything stays on one site rather than splitting your effort across separate domains. The alternative, a country domain per market, means building, hosting and earning links for each one independently.

Will changing a folder name lose my rankings?

It can, if the change is unmanaged. Every page under that folder gets a new address at the same moment, so each needs a permanent redirect from its old one, internal links need updating and the sitemap needs regenerating. Done carefully, rankings usually settle back; done casually, those pages simply disappear and have to start again.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.