In short
A page's click depth is the minimum number of links you have to follow from the home page to reach it. The task is to measure it, then bring the pages that matter closer to the home page: services, categories, flagship products, pricing pages, pillar guides. The usual benchmark is three clicks at most; it is an industry convention, not a threshold published by search engines.
Why it matters
Google says so in its documentation on e-commerce site structure: to estimate a page's relative importance, it may take into account the number of links it has to follow to reach it and the number of internal links pointing to it. A page buried six clicks deep, linked from a single pagination page, sends the opposite of the signal you want for a strategic page.
The mechanism is also practical. Bots discover pages by following links; the farther away a page is, the more its discovery and recrawling depend on intermediate pages that are themselves rarely visited. On a large catalog, deep pages are often the last to be crawled after an update.
For visitors, each extra click is a chance to get lost. Usability studies mainly show that what counts is the clarity of each step, not a magic number: an obvious fourth click is better than three ambiguous ones. Hence the “if possible” in the title.
Generative engine bots also discover pages through links and sitemaps. A page close to the home page, linked from menus and section pages, is more likely to be found by them. No depth guarantees a citation.
Not to be confused: click depth has nothing to do with the number of folders in the URL. /a/b/c/d/produit can be one click from the home page, and /produit eight.
What it improves
- Discovery and recrawling Pages close to the home page are found and revisited faster.
- Perceived relative importance More internal links, fewer intermediaries. An indirect effect on rankings, not guaranteed.
- Catalog indexing Fewer products or articles stuck at the bottom of a paginated series.
- Visitor journey More direct access to the offer, less reliance on internal search.
- Citations in AI answers Easier discovery by AI bots. A plausible effect, not proven.
How to check
With Screaming Frog (free up to 500 URLs): start the crawl from the home page, open the Internal tab, HTML filter, and sort by the Crawl Depth column. The Site Structure tab in the right-hand panel shows how URLs are distributed by depth. A page at depth 0 is the start URL; a page with no depth was not found through any link: it is an orphan (see detect orphan pages (opens in a new tab)).
With Sitebulb, Semrush, Ahrefs or SE Ranking: their site audits show the click depth of each URL, under varying labels (“crawl depth”, “click depth”, “page depth”).
Without a paid tool beyond 500 URLs: use the script from step 1.
Compliant result: every page on the strategic list has a depth of 3 or less, and most of the site's indexable pages are at 4 or less.
Warning: run the measurement from the home page's canonical URL (
https://www.example.com/orhttps://example.com/, with the right protocol). Starting from a URL that redirects adds one level to every page.
How to implement
Step 1 — Measure depth without a paid tool
This Python script only uses the standard library. It crawls the site breadth-first from the home page, following only the <a href> links present in the initial HTML, like a bot that does not run JavaScript, and writes a url, depth, status CSV file. Save it as profondeur.py:
#!/usr/bin/env python3
"""Click depth from the home page, based on <a href> links in the initial HTML."""
import csv
import sys
import time
import urllib.error
import urllib.parse
import urllib.request
from collections import deque
from html.parser import HTMLParser
START = sys.argv[1]
LIMIT = int(sys.argv[2]) if len(sys.argv) > 2 else 2000
HOST = urllib.parse.urlsplit(START).netloc
class LinkParser(HTMLParser):
def __init__(self):
super().__init__()
self.hrefs = []
def handle_starttag(self, tag, attrs):
if tag == "a":
href = dict(attrs).get("href")
if href:
self.hrefs.append(href)
def fetch(url):
request = urllib.request.Request(url, headers={"User-Agent": "profondeur-check/1.0"})
try:
with urllib.request.urlopen(request, timeout=15) as response:
if "text/html" not in response.headers.get("Content-Type", ""):
return response.status, ""
return response.status, response.read().decode("utf-8", "replace")
except urllib.error.HTTPError as error:
return error.code, ""
depth = {START: 0}
queue = deque([START])
writer = csv.writer(sys.stdout)
writer.writerow(["url", "depth", "status"])
crawled = 0
while queue and crawled < LIMIT:
url = queue.popleft()
crawled += 1
try:
status, html = fetch(url)
except Exception as error:
writer.writerow([url, depth[url], f"error: {error}"])
continue
writer.writerow([url, depth[url], status])
parser = LinkParser()
parser.feed(html)
for href in parser.hrefs:
link = urllib.parse.urljoin(url, href).split("#")[0]
parts = urllib.parse.urlsplit(link)
if parts.scheme in ("http", "https") and parts.netloc == HOST and not parts.query and link not in depth:
depth[link] = depth[url] + 1
queue.append(link)
time.sleep(0.3)
Run it, with the maximum number of pages to crawl as the second argument:
python3 profondeur.py https://example.com/ 2000 > profondeur.csv
If every row shows a CERTIFICATE_VERIFY_FAILED error on macOS, run the “Install Certificates.command” program once; it ships in the Python folder under Applications.
The script skips URLs with parameters (filters, sorting) so it does not get lost in facets, and reads neither robots.txt nor nofollow: use it only on your own site. Open the CSV in a spreadsheet and count pages by depth with a pivot table, or:
Number of pages at depth 4 or more (depth in column B):
=COUNTIF(B:B,">=4")
Step 2 — Cross-check with the list of strategic pages
Paste the URLs that matter into a Strategiques tab, taken from your list of priority commercial pages (opens in a new tab) or the keyword-to-page map. Paste the script's CSV (or the crawler export) into a Profondeur tab, then look up the depth of each strategic page:
=IFERROR(VLOOKUP(A2,Profondeur!$A:$B,2,FALSE),"Not found")
“Not found” means the page is not linked by any link the crawler followed: it is the first problem to fix.
| Depth | Strategic pages | Secondary pages |
|---|---|---|
| 1 to 2 | Ideal | Normal |
| 3 | Acceptable | Normal |
| 4 to 5 | Bring closer | Acceptable on a large catalog |
| 6 or more, or not found | Priority | Bring closer |
These thresholds are rules of thumb from practice, not search engine rules.
Step 3 — Choose the right lever
| Cause of the depth | Lever |
|---|---|
| The page is only linked from a distant pagination page | Link from the category, a “flagship products” block, more products per page |
| Too many category levels | Remove a level, or link subcategories directly from the parent category |
| Commercial page missing from the menu | Add it to the menu or to its section's submenu |
| Strategic guide lost in the chronological blog | Link from the section page or the pillar page, an “essential guides” section |
| Page linked only by a non-crawlable JavaScript link | Replace it with a real <a href> link |
| Seasonal or one-off page | Temporary link from the home page during the period |
The most effective levers are links from pages that are already shallow: home page, menu, section pages. A link from a page at depth 2 puts the target at 3. For long lists, see control pagination and infinite scroll (opens in a new tab). An HTML sitemap, linked from the footer, serves as a safety net for visitors and bots; it does not replace a well-linked hierarchy.
WordPress
Versions WordPress 6.4 to 7.1; WooCommerce 9 to 11.
- Menu: add strategic pages to the main menu (
Appearance > Menuson a classic theme,Appearance > Editor > Navigationon a block theme). - Post archives:
Settings > Reading, “Blog pages show at most” field: increasing the number of posts per page shortens paginated series. - WooCommerce: on a classic theme, the number of products per page is set in
Appearance > Customize > WooCommerce > Product Catalog; on a block theme, in the settings of the Product Collection block in the “Product Catalog” template (Appearance > Editor > Templates). - Cross-links: on the home page and section pages, a
Query Loopblock filtered on an “essential” category or tag surfaces the key content.
Shopify
Versions Shopify admin and Online Store 2.0 themes, all plans, November 2026.
Add the important collections to the main menu (Content > Menus, Main menu, with nested items). The number of products per page in a collection is set, depending on the theme, in the theme editor (Online Store > Themes > Customize, collection template, product grid section). For flagship products, add a “Featured collection” section to the home page.
PrestaShop
Versions PrestaShop 8 and 9.
The number of products per page is set in Shop Parameters > Product Settings, Pagination section. The categories shown in the menu are managed in the configuration of the “Main menu” module (Modules > Module Manager). To feature products on the home page, use your theme's featured products module.
Magento
Versions Magento Open Source and Adobe Commerce 2.4.6 to 2.4.9.
In Stores > Settings > Configuration > Catalog > Catalog > Storefront, adjust “Products per Page on Grid Default Value”. Each category has an “Include in Menu” option (Catalog > Categories, in the category's general settings): check that it is enabled for strategic categories.
Laravel
Versions Laravel 10 to 13.
Generate the navigation links on the server side, in a Blade component shared by all pages, from the pages flagged as strategic in the database:
// app/View/Components/FeaturedLinks.php
namespace App\View\Components;
use App\Models\Page;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
class FeaturedLinks extends Component
{
public function render(): View
{
return view('components.featured-links', [
'pages' => Page::query()->where('is_featured', true)->orderBy('position')->get(),
]);
}
}
{{-- resources/views/components/featured-links.blade.php --}}
<nav aria-label="Key pages">
<ul>
@foreach($pages as $page)
<li><a href="{{ route('pages.show', $page) }}">{{ $page->title }}</a></li>
@endforeach
</ul>
</nav>
For paginated lists, paginate() generates crawlable <a href> links to each page.
Next.js
Versions Next.js 15 and 16 (App Router).
Render link blocks in a server component, so that they appear in the initial HTML:
// app/components/featured-links.tsx
import Link from 'next/link'
import { getFeaturedPages } from '@/lib/pages'
export default async function FeaturedLinks() {
const pages = await getFeaturedPages()
return (
<nav aria-label="Key pages">
<ul>
{pages.map((page) => (
<li key={page.slug}>
<Link href={`/${page.slug}`}>{page.title}</Link>
</li>
))}
</ul>
</nav>
)
}
Avoid loading these links on the client side after a fetch: a bot that does not run JavaScript would not see them.
Step 4 — Check again
Run the measurement again after the changes and compare the distribution by depth. Then schedule a monthly crawl: depth degrades every time products or articles are added. See schedule automated crawls (opens in a new tab).
Common mistakes
- Confusing click depth with URL depth: shortening URLs does not bring any page closer to the home page.
- Measuring from a URL that redirects: every depth is shifted by one level.
- Linking everything from the home page: three hundred links on the home page dilute the signal and hurt readability.
- Relying only on the XML sitemap: it helps discovery, but it creates no link and no path for visitors.
- Forgetting the mobile version: if the mobile menu contains fewer links than the desktop menu, the actual depth is greater. See check internal linking parity (opens in a new tab).
- Navigation links loaded in JavaScript on click: invisible to bots that do not run scripts.
- Aiming for three clicks for every page of a hundred-thousand-product catalog: focus the effort on strategic pages.
Frequently asked questions
Is the three-click rule a Google criterion?
No, the three-click rule is an industry convention, not a published criterion. Google only states that it may take into account the number of links needed to reach a page, and the number of internal links pointing to it, to estimate its relative importance. Three clicks is a good benchmark for strategic pages; what matters is that they are close to the home page and well linked.
What is the difference between click depth and URL depth?
Click depth counts the links you have to follow from the home page to reach a page. URL depth counts the folders in its address. The two are independent: a page at /a/b/c/d/ can be linked from the menu, and therefore one click away. For search engines and visitors, click depth is what matters; shortening a URL does not bring the page closer to the home page.
Is the XML sitemap enough for deep pages?
No, the XML sitemap helps search engines discover URLs, but it does not replace internal links. It creates no path for visitors and does not pass on an importance signal the way links from the home page, menus and categories do. Keep a sitemap up to date for all indexable pages, and also link strategic pages from pages close to the home page.
Does an HTML sitemap reduce depth?
Yes, mechanically: an HTML sitemap linked from the footer puts every page it lists two clicks from the home page. It is a useful safety net for visitors and bots on a medium-sized site. On a large catalog, it becomes a long and not very useful list. It does not replace a clear hierarchy with well-linked menus and section pages.
Resources
- Google Search Central: Help Google understand your e-commerce site structuredevelopers.google.com
- Google Search Central: Link best practicesdevelopers.google.com
- Google Search Central: Sitemaps overviewdevelopers.google.com
- Screaming Frog SEO Spider: user guidescreamingfrog.co.uk
- Python: html.parser moduledocs.python.org
Updated on
Topic checklist (PDF)