Skip to the content
searchboar.

Crawling and indexing

Subdirectory: Meaning, examples and limitations

A subdirectory is a path section beneath a website’s hostname, such as /glossary in example.com/glossary/keyword. On modern websites it may be a logical route prefix rather than a physical folder on a server.

At a glance

  • A path prefix organizes addresses under the same hostname.
  • The visible URL does not reveal the underlying file or application layout.
  • A useful structure still needs navigation, content and consistent routing.
On this page
A single hostname contains a clearly organized branch of page paths.
A subdirectory is a path section beneath a website’s hostname, such as /glossary in example.com/glossary/keyword.

What does the path describe?

The hostname identifies the host; the path identifies a resource within that address space. A prefix such as /guides/ can group a collection. The server might serve files, render an application or fetch stored content behind those paths.

A subdomain instead changes the hostname, as in guides.example.com. Neither form automatically proves that the content is easier to crawl or more authoritative. Google's URL guidance focuses on clear, consistent addresses.

Example: two language sections

Imagine English definitions under /glossary and Hungarian definitions under /hu/fogalomtar. The prefixes make the language sections recognizable. Each actual document still needs the correct text, metadata, links and translation references.

The directory name does not choose the language on its own. If the server responds with Hungarian content at an English address, the clean-looking path has not solved localization.

Does a deeper path mean more clicks?

No. /resources/guides/search/keyword can be linked directly from the homepage. A short address can be hidden behind many navigation steps. Click depth counts the link path; URL depth counts path structure. Conflating them can lead to unnecessary URL changes.

Organize prefixes around stable collections and useful ownership boundaries. Do not create elaborate nesting solely to make the address look more optimized.

What should remain consistent?

Use the chosen paths in navigation, canonicals and the sitemap. Check trailing-slash behavior, unknown routes and any overlap with private application paths. Moving an existing collection to a different prefix requires a URL migration plan, including relevant redirects. A directory is an organizing convention, not a replacement for clear information architecture.

Sources

  1. Google: Subdirectory