How to build a valuable category tree on a webpage

Read on to learn the best practices of building a category tree on an e-commerce website - to make the navigation best for SEO and user-firensly at the same time.

TL;DR

  • Plan the category tree from data (keyword research, internal search, sales), not by copying a competitor’s menu.
  • Keep it shallow: important categories within 3 clicks of the home page, with level 3 only where the range justifies it.
  • Give every category one URL, one keyword focus, a unique H1, title and a short, useful description.
  • A product can be in several categories, but should have one URL. Control filter and sort URLs; turn filter combinations with real demand into landing pages.
  • Build the menu from HTML links, add breadcrumbs and keep the XML sitemap limited to indexable category URLs.

Users and search engine crawlers both rely on your categories to understand what you sell. So do AI shopping assistants, which read category pages to learn your range. A category tree that’s planned before the store is built avoids duplicate categories, unclear paths and expensive restructuring later.

What goes wrong when you copy a competitor’s menu?

Many new stores focus on design and copy the menu of a similar shop. That rarely works, because their range, audience and size are different from yours:

ProblemExampleEffect
Empty categoriesCategories for products you don’t sellThin pages for users and Google
Categories that don’t fit your audienceKids / adults / seniors when products don’t differ by ageArbitrary, confusing division
Too much depthA deep tree for a small rangeFew products per category, weak pages
Menu too big for the rangeA marketplace structure for a single-brand shopMany near-empty categories
Structure from another industrySplitting by material when you sell only leather goodsCategories nobody searches for

Looking at competitors is useful, but adapt what you see to your range, industry and customers.

Build in-house SEO leadership

Upgrade your SEO expertise for the AI era and turn insights into an actionable SEO roadmap.

What data should you use to plan a category tree?

  • Keyword research: how people search for your products (by type, room, occasion, gender, material) and which terms have demand (keyword research tools).
  • Search intent: which searches expect a category listing and which expect a guide (search intent).
  • Internal search and analytics: what visitors type into your store’s search and which categories sell.
  • Your product data: which attributes you can reliably fill in for every product (they become filters).
  • Competitors’ categories that rank: as a check, not a template.

How many levels should a category tree have?

LevelPurposeExamples
Level 1The main sections visible in the menu: broad groups or the most important product typesWomen / Men / Kids; Bathroom / Kitchen / Bedroom; Earrings / Rings / Necklaces
Level 2Product types within a sectionWomen → Shoes / Bags / Accessories / Care
Level 3Only for large, varied ranges where it helps buyersWomen → Shoes → Ankle boots / Pumps / Sneakers
FiltersAttributes within a category, not separate categoriesColour, size, material, brand, price

Keep important categories within three clicks of the home page. Deeper pages get fewer internal links and are crawled less often. Go below level 3 only when there are enough products to make each subcategory useful.

Diagram of a website hierarchy showing a homepage leading to two categories, each divided into two subcategories
Expanded women's category menu in the Wojas online store, featuring links to shoes, bags, accessories and care products

How do you optimize category pages for search engines?

1. Keywords for each category

Assign a main keyword and a few related phrases to each category. Use the broadest, most competitive terms for level 1 and more specific ones lower down. Put the main keyword in the category name where it reads naturally, and in the title, H1, URL and description.

Avoid: targeting the same keyword with several categories (cannibalisation: Google won’t know which page to show), and stuffing keywords into names and descriptions.

2. A short, useful category description

When many stores sell the same products with the manufacturer’s descriptions, the category description is often the only unique content on the page. Write it to help people choose: materials, sizes, how to pick the right product, care tips. There is no ideal length (Google); a few useful paragraphs beat thousands of characters of filler. More on writing them: category descriptions for fashion.

Avoid: a long block of text above the products, which pushes the listing off the screen. Put 2–3 sentences above the listing and the rest, with H2/H3 subheadings and an FAQ, below it. Avoid descriptions rewritten from other pages just to include keywords.

3. Category name as the H1

Show the category name as a clear H1 above the product listing.

Avoid: the same H1 on several categories. Each category needs its own unique name, H1 and title. (More than one H1 on a page isn’t a problem for Google, but one clear H1 is the simplest approach.)

4. Breadcrumbs

Breadcrumbs help users move up the tree and help crawlers understand structure, adding internal links to categories. Mark them up with BreadcrumbList structured data (Google). Since January 2025 Google shows breadcrumbs in desktop results only (Google), but their value for navigation and linking hasn’t changed.

Avoid: breadcrumb paths that don’t match the real structure, and different category names in breadcrumbs and in the menu.

5. Products in categories and product URLs

Check regularly that imported products land in the right categories; errors confuse users and search engines. A product can appear in more than one category when that helps shoppers (a hairbrush in “Hair care” and in “Gifts for her”).

Avoid: product URLs that include the category path, such as /for-her/hairbrush and /hair-products/hairbrush. That creates two URLs for the same product. Use one product URL without the category (example.com/hairbrush-boar-bristle), or set a canonical to the main version (Google, product page SEO).

6. Filters, sorting and canonical tags

Filters and sorting can create thousands of URLs for almost the same content. A canonical tag tells Google which version is the main one, but it’s only a hint and Google still has to crawl the variants. Google recommends controlling faceted navigation directly (Google):

  • Keep sorting, view and most filter combinations out of crawling (for example with robots.txt rules for their parameters) and don’t link to them as plain URLs.
  • Choose a few filter combinations with real search demand (“black leather ankle boots”) and make them indexable landing pages with their own title, H1 and description (seasonal and occasion landings).
  • Use canonical tags for remaining duplicates, such as tracking parameters.

Avoid: canonical tags on pages blocked in robots.txt (Google can’t see them), combining noindex with a canonical to another page, and canonicals between categories that each have unique content you want to rank.

7. Tags versus categories

Automatic CMS tags often create many thin pages. Use them only when planned: for example, virtual categories for a season or occasion that you don’t want in the main menu (seasonal calendar).

Avoid: tags that target keywords of existing categories (cannibalisation), tag clouds on the home page and large numbers of low-value tag pages.

8. Menu links and XML sitemap

Build the menu from standard HTML links (anchor elements with an href attribute) that are present in the page source. Menus that only appear after JavaScript runs may be missed, and most AI crawlers don’t run JavaScript at all (Google, Vercel). Include all indexable category URLs in the XML sitemap (Google) and check structure with a crawler (technical SEO tools).

Avoid: URLs in the sitemap that are blocked, noindexed, canonicalised to another page or redirected with 301.

Let your customers find you, wherever they look.

FAQ

How deep should an e-commerce category tree be?

Usually two levels, three for large and varied ranges. Important categories should be reachable within three clicks of the home page.

Can a product be in more than one category?

Yes, as long as it has one URL. Problems start when the category is part of the product URL, creating duplicates.

Should filter pages be indexed?

Only the few combinations people actually search for, as landing pages with unique content. Keep the rest out of crawling.

Do category descriptions still help SEO?

Yes, when they help shoppers choose. They are often the only unique content on a category page.

How do I change my category structure without losing traffic?

Map every old category URL to its new equivalent with 301 redirects, update internal links and the sitemap, and monitor Search Console after the change (indexing problems, SEO and development).

Sources

About the author: This article was prepared by the Insightland SEO and GEO team. Insightland is a Wrocław-based agency, part of the Hexe Capital Tech Hub, that connects business, tech and data: SEO and GEO, performance marketing, UX and analytics, and SEO and AI training. Contact us.

more

Related blog posts

Monthly updates

Update on Statistics from December 2019 and 2020 Seasonality Trends

30 Jan 2020 • Insightland

Content SEO Development Technical SEO

From success to insights – November 2024

09 Dec 2024 • Insightland

AI Search

Are your product descriptions ready for AI-driven search assistants?

25 Sep 2025 • Insightland