Faceted navigation and crawl issues in SEO Fundamentals - Time & Space Complexity
When search engines crawl websites with faceted navigation, the number of pages they visit can grow quickly.
We want to understand how the crawling effort increases as more filter options are added.
Analyze the crawl behavior of a faceted navigation system with multiple filters.
// Example: Faceted navigation with filters
filters = {color: ['red', 'blue'], size: ['S', 'M', 'L'], brand: ['A', 'B']}
// Crawl simulates visiting all combinations
for color in filters.color:
for size in filters.size:
for brand in filters.brand:
visitPage(color, size, brand)
This code visits every page created by combining filter options.
There are nested loops for each filter category.
- Primary operation: Visiting each unique filter combination page.
- How many times: Number of visits equals the product of filter option counts.
As you add more filters or options, the number of pages grows quickly.
| Input Size (filters/options) | Approx. Pages Visited |
|---|---|
| 2 filters with 3 options each | 3 x 3 = 9 |
| 3 filters with 4 options each | 4 x 4 x 4 = 64 |
| 4 filters with 5 options each | 5 x 5 x 5 x 5 = 625 |
Pattern observation: The crawl effort multiplies as filters and options increase.
Time Complexity: O(k^n)
This means the number of pages to crawl grows exponentially with the number of filters.
[X] Wrong: "Adding one more filter only adds a few more pages to crawl."
[OK] Correct: Each new filter multiplies the total pages, causing a big jump in crawl size, not a small increase.
Understanding how faceted navigation affects crawl size helps you design websites that are easier for search engines to handle.
This skill shows you can think about real-world SEO challenges and how site structure impacts performance.
"What if we limited crawling to only one filter at a time? How would the crawl size change?"