A subdirectory (also called a subfolder) is a section of a website that sits in the path of the same domain, for example example.com/blog/. For SEO, the term describes how a site is organized in its URLs.
At a glance
- Type
- path segment of a URL on the same domain
- Affects
- URL structure, same host as the main domain
- Used in
- blog, shop, help center, language versions
- Values
/blog/,/de/
Last checked:
How does a subdirectory differ from a subdomain?
A subdirectory belongs to the path after the domain. A subdomain comes before the domain name, as in blog.example.com.
example.com/blog/ subdirectory
blog.example.com subdomain
Because a subdirectory stays under the main host, it is typically served from the same server setup and under the same domain as the rest of the site.
What does Google say?
For multi-regional and multilingual sites, Google lists URL structures side by side. Subdirectories with a generic domain (example.com/de/) are listed as easy to set up and low maintenance (same host), with the drawbacks of a single server location and harder separation of sites. Subdomains (de.example.com) are listed as easy to set up, allowing different server locations and easy separation of sites. Google says nothing in that guidance about ranking one structure above the other. Whichever you choose, each language version needs its own URL.
Subdirectories can nest, as in example.com/blog/seo/. Each level is another segment of the path, and the path of a URL is only a naming scheme. It does not have to match folders on the server.
| Structure | Example | Target country recognisable? | Pros according to Google | Cons according to Google |
|---|---|---|---|---|
| Country-code domain (ccTLD) | example. | yes, a strong signal to users and search engines | clear geotargeting, server location irrelevant, easy separation of sites | expensive and sometimes limited availability, more infrastructure, strict ccTLD requirements in some cases, one country only |
| Subdomain on a gTLD | de. | not always clear from the URL alone (is "de" the language or the country?) | easy to set up, allows different server locations, easy separation of sites | users might not recognise the targeting from the URL alone |
| Subdirectory on a gTLD (this term) | example. | not always clear from the URL alone | easy to set up, low maintenance (same host) | users might not recognise the targeting from the URL alone, single server location, harder to separate sites |
| URL parameters | example. | not always clear from the URL alone | – (not recommended by Google) | URL-based segmentation difficult, users might not recognise the targeting from the URL alone |
Generic endings such as .com or .org aren't tied to a country. Google also treats .eu, .asia and some country codes such as .io, .ai, .me or .tv as generic. The country targeting setting in Search Console (International Targeting report) no longer exists. Today, a site on a gTLD is targeted through locale-specific URLs and hreflang (in tags, headers or sitemaps). Google also considers server location and other signals such as local addresses, language and currency. Sources: Google Search Central: Managing multi-regional and multilingual sites (last updated 2025-12-10); Search Console Help: International Targeting report (deprecated). Last checked: .
Example
A site serves German and French content under these paths:
https://example.com/de/
https://example.com/fr/
Each language lives in its own subdirectory, and hreflang annotations connect the equivalent pages.
Common mistakes
- Move between subdomain and subdirectory without redirects. Changing URLs is a site move with URL changes. Google advises permanent server-side redirects from old to new URLs.
- Language versions without hreflang. For multilingual sites, Google asks that each language version is marked clearly, for example with hreflang annotations.
Sources
- Managing multi-regional and multilingual sites – Google Search Centraldevelopers.google.com
- What is a URL? – MDN Web Docsdeveloper.mozilla.org
- Site moves with URL changes – Google Search Centraldevelopers.google.com
Last updated: