Sub topic 10
Structuring a Site with Hubs and Shallow Click Depth
This chapter assumes you know how crawlers follow links, what an a element with an href is, and what a slug is. It covers how the shape of your site decides which pages crawlers find easily and which pages readers reach.
Click depth
Click depth is the number of clicks needed to reach a page from the home page, following the shortest path. The home page has depth 0. A page linked from the home page has depth 1. A page linked only from that page has depth 2.
Search engines usually discover pages by following links from pages they already know. Pages close to the home page are found sooner and are usually recrawled more often. A page buried at depth 7 may be crawled rarely, and a page with no incoming links at all (an orphan page) may not be found.
Click depth is not the same as URL depth. A page at /blog/2024/05/guide/ can still be one click from the home page if the home page links to it. Judge depth by links, not by folders in the path.
Hubs and spokes
A hub is a page that links out to a group of related pages. Those pages are the spokes. Each spoke links back to the hub and to a few sibling spokes.
A hub does two jobs. It passes crawlers and visitors from a well-linked page to many deeper pages. It also shows which pages belong to one topic, which helps search engines understand how your content is organized.
A hub should be a useful page and not a bare list of links. Add a short introduction and a one-line description for each spoke, using descriptive anchor text.
Matching slugs to structure
Slugs and folders can reflect the hub structure. Use one folder level per hub:
/guides/is the hub./guides/url-slugs/is a spoke.
Keep the structure shallow. A path like /guides/seo/technical/links/internal/slugs/ adds length without helping anyone. Changing a folder later changes every URL beneath it, so you need 301 redirects for each one (see the earlier chapter on redirects). Choose hub names you can keep.
Checking click depth
You can compute depth with a breadth-first search over your internal links. This script uses a small link graph. In a real audit you would build the graph from a crawl, for example with the link collector from the anchor text chapters.
from collections import deque
def click_depths(links, start="/"):
depths = {start: 0}
queue = deque([start])
while queue:
page = queue.popleft()
for target in links.get(page, []):
if target not in depths:
depths[target] = depths[page] + 1
queue.append(target)
return depths
site = {
"/": ["/guides/", "/products/"],
"/guides/": ["/guides/url-slugs/", "/guides/anchor-text/"],
"/guides/url-slugs/": ["/guides/anchor-text/"],
"/guides/anchor-text/": ["/guides/old-notes/"],
"/products/": [],
"/guides/old-notes/": [],
"/orphan/": ["/"],
}
depths = click_depths(site)
for page in site:
print(page, depths.get(page, "unreachable"))The output shows /guides/old-notes/ at depth 3 and /orphan/ as unreachable. The orphan links out to the home page, but nothing links to it, so a crawler starting at the home page never reaches it.
Practical guidelines
- Aim to keep important pages within about three clicks of the home page. This is a rule of thumb, not a search engine limit.
- Link hubs from the main navigation or the home page.
- Link new pages from their hub the day you publish them.
- Add links between related spokes so readers and crawlers have more than one path.
- Use pagination or "related pages" blocks as normal
aelements, so deep archives do not hide old pages.
Common mistakes
| Mistake | Effect | Fix |
|---|---|---|
| Huge flat menu linking to everything | Dilutes the meaning of the navigation and clutters the page | Link to hubs and let hubs link to spokes |
| Deep chains of category pages | Important pages sit at depth 5 or more | Merge levels or add shortcuts from hubs |
| New pages never linked from a hub | Orphan pages | Add the link when publishing |
| Renaming hubs often | Many redirects and lost links | Choose stable hub names |
Exercise
A site's home page links to /shop/. That page links to /shop/shoes/, which links to /shop/shoes/trail/, which links to /shop/shoes/trail/model-x/. No other page links to model-x. What is the click depth of model-x, and what is one change that makes it shallower?
Show answer
The click depth is 4 (home to /shop/, to /shop/shoes/, to /shop/shoes/trail/, to model-x). To make it shallower, link it from a closer page, for example from the home page's "featured products" block or from the /shop/ hub, using descriptive anchor text such as "Model X trail running shoe". Its URL path does not need to change.