How to fix seo category empty on Headless / Custom (I build in code)

Either populate the empty category with products, or add a noindex tag and remove it from your navigation so Google does not waste crawl budget on a page with no content.

Steps for Headless / Custom (I build in code)

  1. Query your category/collection data source for any category where product_count == 0 at build time (SSG) or request time (SSR/ISR).
  2. Option A — Populate: Update content in your CMS or database to assign products.
  3. Option B — Noindex: In your category page component/template, conditionally render <meta name='robots' content='noindex, follow' /> in the document <head> when the product array is empty. In Next.js use the Metadata API or next/head; in Nuxt use useHead(); in Astro set it in the frontmatter head slot.
  4. Option C — Redirect: In your framework's routing layer (Next.js: getServerSideProps or next.config.js redirects; Nuxt: server middleware; SvelteKit: load function), return a 301 redirect to the parent category when the product array length is 0.
  5. Remove empty categories from any navigation data source (CMS, JSON config, API) so they are not linked from any page.
  6. After deployment, use Google Search Console URL Inspection to confirm the noindex tag is seen by Googlebot or that the 301 redirect resolves correctly.
Official Headless / Custom (I build in code) documentation ↗

What is seo category empty?

A category (also called a collection) page that contains zero products is considered "thin content" by search engines. There is nothing of substance for Google to index — no product listings, no descriptions, no prices — just a shell of a page. This can happen when you create a category in advance, remove all products from it, or when seasonal inventory runs out and is never restocked.

Google actively discounts thin-content pages, and having too many of them across your site can drag down the quality signal for your entire domain, hurting rankings across all your pages — not just the empty one. Empty category pages also waste Google's crawl budget: every minute spent crawling a blank page is a minute not spent discovering your actual product and blog pages. From a user perspective, a shopper who lands on an empty category will immediately leave (high bounce rate) and lose trust in your store, directly costing you conversions and revenue. Removing or hiding these pages is one of the highest-return, lowest-effort technical SEO wins available to any store owner.

See the complete Seo category empty guide for every platform and the full background.

Not sure if your Headless / Custom (I build in code) store has this?

Run a free SEOLZ scan — we’ll find seo category empty and every other issue across your whole site.

Scan my site free

Fix seo category empty on another platform