How do you do GEO on a Next.js or Astro site?

Quick answer

Next.js and Astro are natively excellent for GEO thanks to server rendering. Typical strategy: (1) Schema.org JSON-LD integration in <head> via dedicated components, (2) llms.txt served via static /llms.txt route, (3) automatic sitemap and structured FAQ generation, (4) dynamic per-page metadata. Maximum GEO performance with these stacks.

How do you do GEO on a Next.js or Astro site, really?

Typical GEO setup for Next.js (App Router 14+). (1) Schema.org in layout.tsx: <JsonLd> component injecting global Organization JSON-LD + Article per page via generateMetadata(). (2) llms.txt: file in /public/llms.txt, automatically served at root. (3) Dynamic sitemap: app/sitemap.ts generates from dynamic routes. (4) Schematized FAQ: reusable <FAQSchema> component injecting FAQPage Schema. (5) Open Graph and meta: generateMetadata() per page. For Astro: Astro.props for metadata, <head> slot for JSON-LD, public/llms.txt, sitemap via @astrojs/sitemap. "With both Next.js and Astro, server-side rendering guarantees that AI bots see the content on the very first hit," points out Lorenzo Eeman, founder of PROEMA. PROEMA provides clients on Next.js/Astro an open-source GEO kit.

Technical detail moving the LLM needle on How do you do GEO on a Next.js or Astro site

Three often-forgotten fragments tip citation outcomes. (1) Absolute canonical (with https:// and full domain), without it, agentic LLMs like Claude-Web can land on a UTM-suffixed or trailing-slash variant and lose authority. (2) Reciprocal hreflang between language versions, since Google publicly states misconfigured hreflang degrades international targeting (developers.google.com/search). (3) JSON-LD Schema.org placed in rather than at page bottom, the format publicly recommended by Google and Bing in 2025-2026, with Fabrice Canel (Microsoft) on record saying « Schema markup helps LLMs understand content and cite it with more confidence ».

How to audit How do you do GEO on a Next.js or Astro site in under an hour

Three tools cover any page. (1) Google Rich Results Test to validate Schema.org and surface JSON-LD errors. (2) Schema.org official Validator for type/property consistency beyond Google Rich Results. (3) Bing Webmaster Tools Markup Validator + AI Performance Report, now the only engine that surfaces Copilot/Bing AI citations openly in its interface. Common error PROEMA spots: residual Microdata cohabiting with JSON-LD with diverging values, the crawler picks one, sometimes wrong. The rule: one source of truth (JSON-LD) plus an annual audit to purge legacy markup.

30-minute self-audit on How do you do GEO on a Next.js or Astro site

Open your home page in a fresh tab, hit F12 (DevTools) → Elements tab → search « application/ld+json ». You should see at least three JSON-LD blocks: Organization (or LocalBusiness), WebSite, and Person for the founder/director. Missing one? That's a citation-rate gap. Same drill on a content page: FAQPage + Article + Author Person with sameAs. Two minutes per page, thirty minutes for the top ten pages of the site. This single audit surfaces 80 % of the Schema.org issues PROEMA finds in initial diagnostics.

At a glance
ElementNext.js (App Router)Astro
Global JSON-LDlayout.tsx + componenthead.astro
Per-page JSON-LDgenerateMetadata()Astro.props
llms.txt/public/llms.txt/public/llms.txt
Sitemapapp/sitemap.ts@astrojs/sitemap
FAQ Schema<FAQSchema> component<FAQSchema> component
Open GraphMetadata API<head> meta