Skip to content
Back to Blog
SEO & Web October 20, 2026 9 min read

SEO, GEO and AEO for a Next.js Website in 2026

Search now has two audiences: Google and AI answer engines. Here is the checklist I applied to this very website, with the Next.js code.

SEO, GEO and AEO for a Next.js Website in 2026

SEO, GEO and AEO: what is the difference?

  • SEO (search engine optimization) — be crawlable, fast and relevant so Google ranks your pages.
  • GEO (generative engine optimization) — be understood and cited by AI engines such as ChatGPT, Perplexity, Gemini or Copilot.
  • AEO (answer engine optimization) — write content as clear questions and short direct answers that engines can extract.

They overlap: a fast, well-structured page with clear answers helps all three. Below is what I applied to this website (see the project).

1. Render pages statically

Search engines and AI crawlers read HTML. In the Next.js App Router, pages with generateStaticParams are pre-rendered at build time, so crawlers get complete HTML instantly. A common trap: reading cookies or headers in a layout makes every page dynamic. This site used a language cookie at first; moving the language into the URL made all pages static again.

2. Use real URLs for each language, with hreflang

If the language only changes through a cookie, Google sees one language. Put it in the path (/fr/...) under an app/[lang] segment and declare alternates in the metadata:

export async function generateMetadata({ params }) {
  const { lang } = await params;
  return {
    alternates: {
      canonical: lang === "fr" ? "/fr/portfolio" : "/portfolio",
      languages: { en: "/portfolio", fr: "/fr/portfolio", "x-default": "/portfolio" },
    },
  };
}

In Next.js 16 the old middleware file is called proxy; I use it to serve English at the root and redirect /en/* to the unprefixed URL so there is only one canonical version.

3. Write unique titles and descriptions

One primary keyword per page, titles under about 60 characters, descriptions under about 155, different for each language. Include the location when you target local searches ("Casablanca", "Maroc").

4. Add structured data (JSON-LD)

Structured data tells engines what a page is. On this site:

PageSchema
HomeWebSite, Person, ProfessionalService
ProjectCreativeWork with author, technologies and date
ArticleBlogPosting + FAQPage + BreadcrumbList
CertificateEducationalOccupationalCredential

The Person entity, with the same name, photo and sameAs links (LinkedIn, GitHub) everywhere, is what helps engines connect the site to the right person.

5. Let AI crawlers in

Many sites block AI crawlers without knowing it — some CDNs do it by default. Check both robots.txt and your CDN's bot settings, and explicitly allow the crawlers you want (for example GPTBot, OAI-SearchBot, ClaudeBot, PerplexityBot). Also verify the site in Bing Webmaster Tools: several AI assistants rely on Bing's index.

6. Publish llms.txt

/llms.txt is a short Markdown file that summarises who you are, what you offer and links to your key pages. It is a proposed convention, not a standard, but it is cheap to add and gives AI tools a clean entry point.

7. Write answer-first content (AEO)

  • Use H2 headings phrased as real questions.
  • Put a 40–60-word direct answer right under each heading, then the details.
  • Start articles with a short TL;DR.
  • Use lists and tables for comparisons; add a FAQ block marked up as FAQPage.
  • Show a "last updated" date and keep facts precise (names, numbers, places).

8. Keep Core Web Vitals green

Fast pages rank better and get crawled more. Serve images in AVIF/WebP with explicit sizes, load third-party scripts after interaction or consent, and check LCP, INP and CLS on mobile after each release.

How to measure results

  • Google Search Console and Bing Webmaster Tools: indexing, queries, clicks.
  • Analytics referrals from chatgpt.com, perplexity.ai or copilot.microsoft.com.
  • A monthly test: ask AI assistants your target questions and note whether your pages are cited.

Need an SEO audit?

I audit and fix technical SEO for Next.js, React and WordPress sites, including GEO and AEO. See my services or contact me.

SEOGEOAEONext.jshreflangJSON-LDllms.txtCore Web Vitals
Anass Essadikine

About the author

Anass Essadikine

Data & AI Engineer and Software Engineer based in Casablanca, Morocco. I build data platforms, Power BI dashboards, RAG assistants and Next.js / Spring Boot applications.

Related projects

Frequently asked questions

No. AI engines rely on pages that are crawlable, fast and well structured, which is exactly what SEO provides. GEO adds clarity about who you are and content that is easy to quote.

Keep reading

All articles

Looking for someone with these skills?

I'm open to freelance projects, internships and full-time roles. Let's talk.