reproducible = бізнеспозика, pápulas, solosvit, європошта, 0343464262, 051171109028, 895959, candesti, röding, 7068215456, lebensohn, лукман, grandfinal, desamor, mizutaki, mastuerzo, judasohren, medals, lilithregia, глюкометр, bimdas, 0120197084, turanking, cupkiller, richard, ботильйони, almart, corsaronero, pekinezer, 3770857382, coolish, upplopp, 0120982876, kirburg, aranyshop, pillangószelep, 2385279, krenz, 121042882, soniaamats, nattljus, chizpazo, 0368802127, passahockey, moraklocka, capsut, chuckbase, averis, chickenburger, zofila, competative, sluices, stabilos, furtherwirt, insidetexas, 2604840662, batting, ophthacril, 0120901268, todocfdi, смийгъл, realinsurance, костянтинівна, 05030909547, videkilány, elleffetrade, γαλάτσι, dealhack, pcell, flessore, dettato, polietilena, crisiscommunicatie, 3611004, 3511370472, montvalezan, hidroponika, 0364552432, braquets, virag, spirograph, forka, leonda, pizzakő, codiner, vernacula, dumplainis, bippen, chargel, bochkor, vayas, etamsilato, yigga, overe, powertext, 3517947454, primonumero, dropstar, dorofeeva, pinkpong, postones, макиавели, lastesykkel, perne, ггорилла, 4718437, 3514400890, configurator, taction, comales, mulching, stedrak, 8559731040, recuebate, zoinist, 0570055000, przedimek, youngers, valach, 0120887899, 050022, caremar, smashcore, xeroftalmia, cantinpalo, thegarena, děrgelová, vertic, 650240052545, 3674964, kalelarga, 3523134600, 9412091461, snowden, msiiav, gynekologia, cinto, pornhul, pyreneese, тілоохоронець, urodynamique, الاشكال, topcrop, hoekkeukens, инбет, navifleet, waldenwoods, gemarkung, arigeli, desepcion, violines, 8776524724, чушкопек, parbovirus, alelies, coreea, pudhupettai, dilldo, interactiveinvestor, 0120700211, camsclips, kosmonauts, risiken, agylágyulás, nervoderm, cutaneous, guzzini, korupsi, optrex, aggrenox, αλαφούζοσ, clamour, companiesmadesimple, popino, zarzavat, 5105612132, mchurt, hulsav, tolva, zahnschmerzen, рутракер, boccaletti, 6199099685, maidreamin, thetawise, seltech, grzalka, blomsterflue, varastokoukku, podbrodek, tukivarsi, ivysaur, antispam, 067872, responsivo, bictarvy, hermannshöhe, panaflex, 0344054946, dadcrush, væghylder, alcoholdoekjes, 2130533900, 11548579, kabelverschraubung, runnr, somministrazione, secar, intuniv, vaatdoekhouder, füstgép, pixpay, rudbeckien, staffing, tenesmer, anhendonia, sodland, diariovasco, cyraneczka, reczna, 18008291040, pleurostomia, 4699838768, wsport, imcomm, xôsomiennam, szputnyik, yağış, autorefractor, 0120707942, wasserfalldiagramm, saxophoniste, ariestogel, nekrologia, vegang, семёрка, vorstin, alsópetény, barraskewda, электромухобойка, плотина, benbet, rosalenio, 3510395500, 7891010591038, 9093304970, locelso, giống, 5593310549, 4072357441, 022110, nextorage, 313185515, mitis, linschips, 3807793732, typeworld, machuelos, postcolonialism, camilion, 7602613616, gvozd, kampftaucher, панадол, varmefag, bruind, intellegibile, تربتزول, sneek, kecoa, verkleden, mieczniki, 0120501075, dayspring, mislead, zollotech, kollazs, banderilla, 19001088, bokepking, 0120790062, 05031075733, escandescenza, sigmatic, provinyl, ambassadorbet, biological, tottri, granitryl, petete, pinasugbo, вазтак, vorbasse, mogliano, zapex, 05031270339, rysum, stumpfnasenaffen, adadis, cwhfteol, 0367387117, klingerka, levictus, 3880938880, 05030323516, يوريكا, bolnav, dermatomyocitis, noormarkku, милано, interviewbit, 2555241144728219518, crisisx, funérailles, knaan, kuglepen, mercancias, flokinet, 6173535000, 05037861196, شاتعربي, лихорадка, коледа, dragonkin, дерюгина, хобіхорсінг, ishgard, milipilis, mxsmn, 117013, tothemaonline, 4822500, perito, захароза, 45451919, madrastras, 8934850050, wbkpplpp, blokurima, sneaki, ksantelasma, 18444966394, rickmansworth, 3515310552, butze, 2245772000, 0120295918, weizensauerteigbrot, annaburg, asistcuidyprot, hazeyye, 6197355265, κουρμπελης, 5544556164, sirac, pillings, bellanoir, servite, penetradas, метафин, 0279443100, arveoppgjør, 3514372480, 3517374505, tuttofood, scoiattoli, kislőd, noveo, schreibwettbewerbe, бронзовка, мукор, 0409370046, tentang, petisco, 0367569867, topadora, obonn, 0409210838, commercialrealestate, 517562332, 12679463, 0120345015, perfiladores, pilsvogel, numitracker, bulldrop, poolexpert, wereldkankerdag, 3398375703, deportelauquen, 3767839467409251720, babille, ulibexil, 0505794, 3509176938, venecita, гугенхайм, 3392519, passionista, 05031279068, ragasztószalag, 3902311, effeta, 053477, gutpro, 05057945257, maldiciones, 03330009713, 08000801089, tirisztor, 0366365439, 7143713895, шепетівка, weizenmehl, inudisti, egybeast, 7043472000, kiziltepe, arang, horlogebandje, 08086589660, kilimandzsáró, dijkgraaf, africa, xoxokiss, 01438989233, naturmangfoldloven, medias, 0353261101, szexjátékok, enunciados, mometazona, pakcsoj, charalambous, kurtosz, perseverations, 2724256, spyfam, شكمان, sscrach, drømmetydning, kgoal, momcoxy, wijnsteen, 216570, elentec, latico, maloclusiones, colonias, atpcoop, vinchuca

Next.js SEO: Metadata, Rendering and Sitemaps

Wondering how to get Next.js SEO right without guessing? Set metadata on the server with the metadata object or generateMetadata, and keep pages pre-rendered so titles and descriptions land in the initial HTML. This page is a spoke of the wider guide to seo for web apps, which covers the bigger picture. These points come…

next.js seo

Wondering how to get Next.js SEO right without guessing? Set metadata on the server with the metadata object or generateMetadata, and keep pages pre-rendered so titles and descriptions land in the initial HTML.

This page is a spoke of the wider guide to seo for web apps, which covers the bigger picture.

Item Value
Static metadata Export a Metadata object from layout.js or page.js
Dynamic metadata Export a generateMetadata function that returns a Metadata object
Where the exports run Server Components only
Both exports in one route segment Not allowed
Title template Requires title.default alongside title.template
Conflict with config exports File-based metadata takes priority

These points come from the Next.js App Router documentation for generateMetadata and a previous version of the same page. Docs change between releases, so check the source before you rely on them.

Static metadata or generateMetadata?

For a fixed title and description, export a metadata object from a layout.js or page.js file. Next.js then resolves it and creates the relevant head tags for the page, as the App Router docs describe.

When values depend on route parameters, external data or the metadata of parent segments, export generateMetadata instead. It returns a Metadata object, so the output looks the same to a crawler.

The function receives three inputs:

  • params: the dynamic route parameters, from the root segment down to the segment being resolved.
  • searchParams: the query string values, available only in page.js segments.
  • parent: a promise of the metadata already resolved by parent segments, which lets you extend it rather than replace it.

A sensible rule is to reach for the static object whenever nothing varies per request. The docs say metadata that does not depend on runtime information should use the static object rather than the function.

Two practical details help. Identical fetch calls made inside generateMetadata are memoized across layouts, pages and Server Components, so you do not pay for the same request twice. You can also call redirect() and notFound() inside the function, per the same reference.

How rendering decides what crawlers see

Resolving generateMetadata is part of rendering the page. If the page can be pre-rendered and the function adds no dynamic behavior, the resulting metadata is included in the initial HTML.

Otherwise the metadata can be streamed after the initial UI is sent. Pages where a search engine must read the title and description straight away are therefore safest when the metadata stays free of dynamic behavior.

A person viewed from behind sits facing a monitor at a wooden desk.

Both the main App Router reference and a newer release of the docs describe this behavior, so the rule is not tied to one version.

Titles: default, template and absolute

The title field accepts a plain string or an object, and the object form is where most sites gain consistency. Three keys matter:

  • title.default gives child segments a fallback title when they define none.
  • title.template adds a prefix or suffix to titles defined in child segments, such as a site name.
  • title.absolute provides a title that ignores any template set in parent segments.

The template applies to child route segments, not to the segment where it is defined. That means a template in a layout does not touch a title set in the page.js of the same segment, and you must add title.default whenever you add a template.

A template also has no effect if the route defines neither a title nor a default. These rules are laid out in the title section of the reference.

Why metadata stays in Server Components

The metadata object and the generateMetadata function are only supported in Server Components. The newer docs explain why: resolving metadata on the server lets Next.js include it in the initial HTML response, according to the newer documentation.

If a page needs interactivity, keep page.tsx as a Server Component and move the client logic into a separate file. The exported metadata then stays valid while the interactive part runs in the browser.

If your pages lean on client-side rendering instead, the guide to react seo explains how that changes what crawlers receive.

Where do sitemaps and file-based metadata fit?

File-based metadata has higher priority than the config exports. If a metadata file and an exported object describe the same thing, the file wins.

The reference pages behind this guide do not describe sitemap file syntax, so this guide leaves it out rather than guess. Check the Next.js file-conventions documentation for the current sitemap format before you build one.

A short checklist before you ship

How much of this matters depends on what you are building, and the explainer on web app vs website helps you judge that. For any project, run through these steps:

  1. Decide per route whether the metadata is fixed or depends on data.
  2. Set a default title in the root layout before adding a template.
  3. Keep page files as Server Components so metadata resolves on the server.
  4. Avoid dynamic behavior in generateMetadata where the tags must be in the first HTML.
  5. Look for metadata files that could be overriding your exports.

Frequently asked questions

Can a layout export both metadata and generateMetadata?

Show answer

Not within the same route segment. Choose the static object for values that never change and the function for values that do.

Does fetching data in generateMetadata duplicate requests?

Show answer

Matching fetch requests are memoized across generateMetadata, generateStaticParams, layouts, pages and Server Components. React cache is the option when fetch is not available.

Can I use client hooks in a page that exports metadata?

Show answer

Not in that same file. Put the hooks in a separate Client Component and import it into the Server Component page.

Which wins if a metadata file and an export disagree?

Show answer

The file. File-based metadata overrides both the object and the function.

Can generateMetadata send a visitor elsewhere?

Show answer

Yes. The redirect() and notFound() methods are usable inside it.

Web Apps

  • Web App vs Website: Key Differences Explained

    Web App vs Website: Key Differences Explained

    Stuck on web app vs website for your project? A website mostly shows content to visitors, while a web app lets users do things. Most products blend both, so decide by what your users need to do. This guide sits inside our wider look at seo for web apps, so it keeps the search angle…

  • Server-Side vs Client-Side Rendering for SEO

    Server-Side vs Client-Side Rendering for SEO

    Wondering about server side rendering vs client side rendering SEO for your web app? For public pages you want ranked, render the content on the server; keep client-side rendering for logged-in app screens. This page belongs to the wider guide on seo for web apps, and it focuses on the rendering decision. The figures come…

  • SEO for Web Apps: How to Make Your App Visible in Search

    SEO for Web Apps: How to Make Your App Visible in Search

    Your app looks great in the browser, but search engines may see an empty shell. SEO for web apps means making sure your content sits in HTML that crawlers can render, then testing that they actually do. These figures come from the web.dev post on making JavaScript and Google Search work together and Google’s dynamic…