How to fix seo category empty on Next.js (Headless)
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 Next.js (Headless)
- In your category page route (e.g. `app/categories/[slug]/page.tsx` or `pages/categories/[slug].tsx`), fetch the product list for the category at build/request time and check whether `products.length === 0`.
- If using the App Router, export a `generateMetadata` function that returns `robots: { index: false, follow: false }` when the category is empty, and `robots: { index: true, follow: true }` when it has products.
- If using the Pages Router, use `next/head` inside the page component to conditionally render `<meta name='robots' content='noindex,nofollow' />` when the product list is empty.
- Remove empty category pages from your sitemap (e.g. `app/sitemap.ts` or a custom `pages/sitemap.xml.tsx`) by filtering out slugs whose product count is 0.
- Remove empty category links from your navigation component (e.g. `components/Navigation.tsx`) by filtering the category list to only those with `productCount > 0` before rendering `<Link>` elements.
- Optionally, redirect empty category URLs to the parent category or home page using Next.js `redirect()` (App Router) or `getServerSideProps` + `res.redirect` (Pages Router) to avoid soft 404s entirely.
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 Next.js (Headless) 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