Prompt
How do I build pages for every product and keyword variant
Latest observation
To build pages for every product and keyword variant, you usually want a templated, programmatic SEO setup rather than manually creating pages one by one.
1) Define the page types
Decide what kinds of pages you want:
- Product pages: one page per product
- Keyword variant pages: pages like:
/product-name//product-name/red//product-name/red-large//keyword-variant/
If you create too many thin pages, search engines may treat them as low-value, so make sure each page has unique usefulness.
2) Build a page template
Create one reusable template with dynamic fields:
- title
- slug
- H1
- description
- specs
- FAQs
- related products/keywords
- internal links
- images/reviews/schema
Example structure:
<title>{{ product_name }} {{ variant_keyword }} | Brand</title>
<h1>{{ product_name }} {{ variant_keyword }}</h1>
<p>{{ unique_intro }}</p>
3) Store the data
Keep product and keyword variant data in a database or CMS:
- product name
- category
- attributes
- keyword variants
- search intent
- description blocks
- images
- canonical URL
- metadata
You can generate pages from:
- a database
- CSV/Google Sheet
- CMS like Sanity, Contentful, Strapi, WordPress
- a static data file
4) Generate routes programmatically
If you’re using a framework like Next.js, Nuxt, Remix, or Gatsby, create dynamic routes.
Example in Next.js
export async function getStaticPaths() {
const pages = await fetchPagesFromDB();
return {
paths: pages.map((page) => ({ params: { slug: page.slug } })),
fallback: false,
};
}
export async function getStaticProps({ params }) {
const page = await fetchPageBySlug(params.slug);
return { props: { page } };
}
5) Handle keyword variants carefully
Not every keyword deserves its own page. Create a page only if the variant has:
- distinct search intent
- enough content to be unique
- meaningful conversion potential
- enough demand
Otherwise, use:
- filters
- on-page sections
- FAQ blocks
- internal anchors
- canonical tags to the main page
6) Prevent duplicate/thin content
To avoid SEO issues:
- make each page uniquely valuable
- don’t auto-spin text
- use canonical tags where appropriate
- noindex low-value variants
- consolidate similar variants into one stronger page
7) Add SEO essentials
Each page should have:
- unique title tag
- unique meta description
- structured data
- clean URLs
- internal links
- image alt text
- canonical URL
- sitemap inclusion
8) Create the sitemap automatically
If you generate many pages, update your sitemap dynamically so search engines can crawl them.
9) Example page generation logic
A simple pattern:
- Read product list
- Read keyword variants
- Match variants to product intent
- Generate slug + metadata
- Render page from template
- Add to sitemap
10) Best practice
Use a hybrid approach:
- build pages only for high-value product/keyword combinations
- group similar variants into one strong page
- use programmatic SEO for scale, but keep content quality high
If you want, I can show you:
- a Next.js implementation,
- a WordPress/custom CMS setup, or
- a database schema for product + keyword variant pages.