6.1 Metadata API: SEO in Next.js
export const metadata: Metadata = { title, description, openGraph, twitter }. Static metadata in layout.tsx/page.tsx. Dynamic metadata: export async function generateMetadata({ params }). Template titles: { template: '%s | MyApp' }. Open Graph images for social sharing. robots.txt and sitemap.xml generation. Structured data (JSON-LD). Why SSR + Metadata API = best-in-class SEO without effort.
6.2 next/image: Automatic Image Optimisation
Image component: automatic resize, WebP/AVIF format, lazy loading, blur placeholder. width/height required (prevents CLS). fill mode for responsive images. Priority prop for above-the-fold images (disable lazy loading). Remote image domains: images.remotePatterns config. The Image component alone improves Lighthouse performance by 20-30 points. Never use <img> in Next.js — always use next/image.
6.3 next/font: Zero-Layout-Shift Fonts
next/font/google: import Google Fonts at build time (no external requests). Self-hosted, GDPR-compliant, zero layout shift. Variable fonts: const inter = Inter({ subsets: ['latin'] }). Apply via className. Local fonts: next/font/local for custom fonts. Font optimisation eliminates CLS from font loading — automatic, zero-effort.
6.4 Performance: Bundling, Prefetching & Edge
Automatic code splitting per route. Tree shaking: unused code removed. Prefetching: Link component preloads pages on viewport entry. Turbopack (dev): 10x faster than Webpack. Edge Runtime: run lightweight functions at CDN edge locations (faster for geographically distributed users). Partial Prerendering (experimental): static shell + dynamic content in one page. The performance stack that makes Next.js the fastest React framework.
6.5 Accessibility & Web Vitals
Core Web Vitals: LCP, INP, CLS — Next.js optimises all three automatically (images, fonts, streaming). next/script for third-party scripts with loading strategies (defer, lazyOnload). Lighthouse CI in GitHub Actions: track performance on every PR. Built-in ESLint: next/core-web-vitals config. Accessibility: semantic HTML, focus management, aria attributes. useReportWebVitals hook for analytics.
Placement relevance: "How does Next.js handle SEO?" is asked in every Next.js interview. The Metadata API, next/image, and next/font are practical topics that every Next.js developer uses daily. Understanding caching strategies and rendering modes (static, dynamic, ISR, streaming) demonstrates the architectural knowledge product companies evaluate in senior interviews.