Rendering Strategies, Metadata and SEO
Choose between SSR, SSG, ISR and client rendering, and make public pages discoverable with metadata, sitemaps and fast loads.
Intermediate · about 4 hours · difficulty 3/5
Learn first: Data Fetching and Caching in Next.js
Public pages like job listings, company profiles and blog posts need to be found on Google and shared on WhatsApp and LinkedIn. Logged-in dashboards do not. Choose rendering accordingly.
The strategies
- SSG: HTML built ahead of time. Fastest, cheapest, ideal for content that rarely changes.
- ISR: static pages regenerated in the background after a time or on demand.
- SSR: HTML rendered per request. Needed for personalised or always-fresh pages.
- CSR: the browser renders after loading JavaScript. Fine behind a login, poor for SEO.
Metadata
Export metadata or generateMetadata from a page to set the title, description and Open Graph tags, so a shared link shows a proper preview card. Add a sitemap.ts and robots.ts so search engines can find and crawl your pages.
Structured data and images
JSON-LD structured data (for example JobPosting) can earn rich search results. Use next/image for responsive, lazy-loaded images, and next/font to avoid layout shifts from web fonts.
Pitfalls
- Rendering public content only on the client, so crawlers and link previews see an empty page.
- The same title and description on every page.
- Blocking your whole site in robots.txt by accident after launch.
You are ready to move on when your public company and internship pages have unique metadata, share previews, a sitemap and a good Lighthouse SEO score.
Key concepts
- SSG, ISR, SSR and CSR
- Metadata API
- Open Graph previews
- sitemap and robots
- JSON-LD structured data
- next/image and next/font
Mini project
Add dynamic metadata, Open Graph images, a sitemap and JobPosting JSON-LD to your public internship pages, then check share previews and run a Lighthouse SEO audit.
Check yourself
Which pages in a placement portal should be statically generated, and which must be rendered per request? Justify two of each.
Free resources
- Metadata and OG images (Next.js)
- SEO Starter Guide (Google Search Central)
- Rendering on the Web (web.dev)