Prompt
I'm building a marketplace and want to create pages for every category and subcategory
Latest observation
Oct 25, 2026
OpenAI APIWeb search: off
A good way to do this is to create hierarchical, SEO-friendly category pages with a repeatable URL pattern and dynamic page generation.
Recommended structure
Use URLs like:
/categories/categories/electronics/categories/electronics/phones/categories/home-garden/categories/home-garden/furniture
This gives you:
- clear navigation for users
- strong SEO signals
- an easy way to generate pages at scale
Data model
Store categories with a parent-child relationship:
Category {
id
name
slug
parentId // null for top-level categories
description
seoTitle
seoDescription
}
Example:
- Electronics → parentId: null
- Phones → parentId: Electronics.id
- Smartphones → parentId: Phones.id
Page generation approach
For each category page, render:
- Category title
- Breadcrumbs
- Description
- Subcategories
- Marketplace listings filtered by that category
- Internal links to related categories
Example page sections:
- Electronics
- Phones
- Laptops
- TVs
- Listings in Electronics
SEO tips
- Give each page unique title/meta description
- Include indexable text content, not just listings
- Use breadcrumb structured data
- Avoid duplicate pages for the same category via filters unless canonicalized
- Generate XML sitemaps for all category pages
If using Next.js / similar
You can create a dynamic route like:
pages/categories/[...slug].js
Then:
/categories/electronics/categories/electronics/phones
resolve by slug path.
Important considerations
- Don’t create thin pages with only 1–2 listings and no useful content
- Avoid infinite category depth unless your taxonomy really needs it
- Add pagination for large listing sets
- Make sure category slugs are stable over time
- Decide whether subcategories should inherit listings from parents
Best practice for marketplaces
Usually the best setup is:
- category landing page
- subcategory landing page
- optional filter pages, but only index the important ones
If you want, I can help you design:
- a database schema
- a URL structure
- a Next.js implementation
- an SEO content template for each category page
Brands