# Subdirectory

Category: [Technical SEO](https://seo-geo-glossary.com/en/glossary/category/technical-seo/) › [URLs & domains](https://seo-geo-glossary.com/en/glossary/category/technical-seo/urls-domains/) · Also known as: subfolder, folder

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.

## 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.

## 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.

## 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/
- **Docs:** [Google: multi-regional sites](https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites)

Last checked: October 8, 2026

## URL structures for country versions compared

| Structure | Example | Target country recognisable? | Pros according to Google | Cons according to Google |
|---|---|---|---|---|
| Country-code domain (ccTLD) | example.de | 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.example.com | 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 | example.com/de/ | 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.com?loc=de | 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 |

Sources: [Google Search Central: Managing multi-regional and multilingual sites (last updated 2025-12-10)](https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites); [Search Console Help: International Targeting report (deprecated)](https://support.google.com/webmasters/answer/62399). Last checked: October 8, 2026

*Diagram: Anatomy of a URL.* A URL broken into its parts. RFC 3986 defines scheme, host, path, query and fragment. Only the browser evaluates the fragment after #, it is not sent to the server.

## Not to be confused with

- [Subdomain](https://seo-geo-glossary.com/en/glossary/subdomain/index.md): is a name placed in front of the domain, such as blog.example.com, and can point to a different server. A robots.txt file applies only to its own host, so every subdomain needs its own file.

## Related terms

- [Subdomain](https://seo-geo-glossary.com/en/glossary/subdomain/index.md)
- [URL](https://seo-geo-glossary.com/en/glossary/url/index.md)
- [URL structure](https://seo-geo-glossary.com/en/glossary/url-structure/index.md)
- [Domain](https://seo-geo-glossary.com/en/glossary/domain/index.md)
- [hreflang](https://seo-geo-glossary.com/en/glossary/hreflang/index.md)

## Sources

- [Managing multi-regional and multilingual sites – Google Search Central](https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites)
- [What is a URL? – MDN Web Docs](https://developer.mozilla.org/en-US/docs/Learn_web_development/Howto/Web_mechanics/What_is_a_URL)
- [Site moves with URL changes – Google Search Central](https://developers.google.com/search/docs/crawling-indexing/site-move-with-url-changes)

---

Last updated: October 8, 2026
URL: https://seo-geo-glossary.com/en/glossary/subdirectory/
