Real World Example

SEO Checklist Used by E-commerce Teams

For shops like Nykaa, Croma or Lenskart, organic Google traffic is a major source of sales. Their Next.js pages follow a checklist like this:

ItemNext.js feature
Unique title and description per productgenerateMetadata
One canonical URL per productalternates.canonical + permanent redirects
Rich results (price, stars)JSON-LD Product
Share previewsopengraph-image.tsx
All products discoverablesitemap.ts (split with generateSitemaps above 50,000 URLs)
Keep private pages outrobots.ts + robots: { index: false }
Fast pages (Core Web Vitals)Server Components, next/image, caching

Category Page Metadata

// app/category/[slug]/page.tsx
import type { Metadata } from 'next';

export async function generateMetadata({
  params,
  searchParams,
}: {
  params: Promise<{ slug: string }>;
  searchParams: Promise<{ page?: string }>;
}): Promise<Metadata> {
  const { slug } = await params;
  const { page = '1' } = await searchParams;
  const category = await getCategory(slug);
  const title = 'Buy ' + category.name + ' Online at Best Prices' + (page !== '1' ? ' — Page ' + page : '');

  return {
    title,
    description: 'Shop ' + category.productCount + '+ ' + category.name.toLowerCase() + ' with free delivery and easy returns.',
    alternates: { canonical: '/category/' + slug + (page !== '1' ? '?page=' + page : '') },
  };
}