Node.js

SEO and GEO for Next.js and Node.js websites: the complete checklist

5 min read By Cloud Ninza

Next.js can produce some of the fastest, most crawlable pages on the web — or pages that are empty until JavaScript runs. Here is how to make sure search engines and AI assistants see everything.

In short For a Next.js or Node.js website to rank and be cited by AI assistants: render pages on the server (server components, SSG or SSR) so the HTML already contains the content; give every route its own title, description and canonical through the Metadata API or your template; serve sitemap.xml, robots.txt and llms.txt; add Organization and page-level JSON-LD; return real 404s; and keep Core Web Vitals green. A tool such as Search Master on Cloud Ninza checks the live site, scores every page, serves the files in front of your app and submits pages to IndexNow.

1. Make sure the content is in the HTML

Google renders JavaScript, but later and not always completely. Bing renders less, and most AI fetchers — the ones ChatGPT, Claude and Perplexity use to read a page while answering — read the HTML and do not run your JavaScript at all. A page whose text appears only after hydration can be invisible to them.

Check any page with View source (not the developer tools’ Elements panel): your headings and paragraphs must be there.

  • Next.js App Router: keep pages as server components; use client components only for interactive parts.
  • Use static generation for marketing pages, blog posts and docs; server rendering for pages that change per request.
  • Avoid putting the main content behind useEffect fetches.
  • Express or NestJS with a template engine (EJS, Pug, Handlebars) already sends full HTML — keep it that way for public pages.

2. One title, description and canonical per page

In the App Router export metadata or generateMetadata from each page: title, description, alternates.canonical, openGraph and robots. Make titles unique and descriptive (50–60 characters), descriptions 120–155 characters with a reason to click. In Express, pass title and description from each route into the layout.

Common mistakes

The same title on every page (often the site name only); a canonical that points every page to the home page; preview or staging deployments that are indexable — send noindex on any non-production host.

3. sitemap.xml, robots.txt and llms.txt

Next.js can generate sitemap.xml and robots.txt from app/sitemap.ts and app/robots.ts; Express apps can serve them from a route or the public folder. Include every public page and exclude dashboards, search results and API routes.

llms.txt is a short Markdown summary of the site for AI systems, and llms-full.txt carries the main text. Serve them as plain text at the root.

With Search Master

If you would rather not write these in code, Search Master can generate them from your pages and business details and the Cloud Ninza web server answers /robots.txt, /sitemap.xml, /llms.txt and /llms-full.txt in front of your app — every deploy keeps them, and Keep mine leaves your own files in charge.

4. Structured data (JSON-LD)

Add an Organization (or LocalBusiness) script in the root layout with name, logo, url, contact points and sameAs links to every social profile; then per page add WebPage, BreadcrumbList, Article or Product, and FAQPage where you show FAQs. In Next.js render it as a script tag with type application/ld+json inside the page component. Search Master’s Business & schema tab gives you the Organization JSON-LD ready to paste and a FAQ schema maker.

5. Speed and Core Web Vitals

  • Use next/image with explicit sizes; serve WebP or AVIF.
  • Load fonts with next/font (self-hosted, no layout shift).
  • Keep client JavaScript small: fewer client components, dynamic import for heavy widgets, third-party scripts with strategy lazyOnload.
  • Cache pages that are the same for everyone. On Cloud Ninza, Ninza Speed adds a server page cache in front of your app from the dashboard; requests with cookies always reach the app.
  • Measure with pagespeed.web.dev on mobile.

6. Status codes, redirects and URLs

  • Return a real 404 status for missing pages (notFound() in Next.js), never a 200 “not found” page.
  • Use 301 (permanentRedirect) when an address changes.
  • One address per page: choose with or without trailing slash and www, redirect the other.
  • Readable, lowercase, hyphenated URLs.

7. The best SEO tool for a Node.js website

On Cloud Ninza, Search Master works for this kind of website from the dashboard (Marketing → Marketplace) on Growth, Business and Pro plans: a live health check, a score for every page, robots.txt, llms.txt and sitemap.xml served in front of your app without touching your code, IndexNow, and ready Organization and FAQ schema to paste.

It reads your live site from outside, the way crawlers do, so it works whatever framework or rendering mode you use — and it tells you when a page looks empty without JavaScript.

Internal links and site structure

Search engines and AI fetchers discover pages by following links. Use real anchor tags (Next.js Link renders one) with descriptive text, not buttons with onClick navigation. Link every important page from at least one other page, keep important pages within three clicks of the home page, and add breadcrumbs on deep pages with BreadcrumbList schema. Paginated lists should have plain links to the next page, not only infinite scroll.

Internationalisation and duplicate content

If you serve several languages or countries, give each its own URL (/en, /hi or subdomains), set hreflang alternates in metadata, and do not redirect visitors automatically by IP — crawlers mostly come from one country and would see one version only. Make sure query-string variations (sort, utm) carry a canonical to the clean URL.

A deploy checklist for Node.js sites

  • View source on three page types: is the content in the HTML?
  • Titles and descriptions unique on each (Search Master’s Pages tab lists duplicates).
  • sitemap.xml lists new pages; robots.txt names the sitemap and does not block CSS or JS.
  • Missing pages return 404; changed URLs return 301.
  • Open Graph image shows when the link is pasted in WhatsApp.
  • Purge the page cache, then run the health check and send new pages to IndexNow.

Monitoring after launch

Connect Google Search Console and Bing Webmaster Tools and look at the Pages (indexing) report weekly for “Crawled — currently not indexed” and “Discovered — currently not indexed”. Usually these are thin or near-duplicate pages; improve or merge them. Watch Core Web Vitals in Search Console, which uses real visitors’ data, alongside lab tests.

Content: what a Node.js site usually lacks

Teams that build in Next.js or Express often have excellent technical foundations and very little text. A home page with a headline, three icons and a button gives search engines and assistants nothing to rank or quote. For each product or service, write a page that explains what it is, who it is for, how it works, what it costs and how it compares, with a short answer at the top and FAQs at the bottom. For SaaS products, documentation, changelogs, integration pages and comparison pages are often the pages that rank first and are quoted most by AI assistants.

Use MDX or a headless CMS so non-developers can publish without a deploy, and make sure every new route is added to the sitemap automatically. Search Master’s Pages tab flags thin pages (too few words) so you know where to start.

Key takeaways

The short version, for anyone skimming:

  • AI fetchers usually do not run JavaScript: render public content on the server.
  • Unique metadata, canonical and Open Graph per route.
  • Serve sitemap.xml, robots.txt, llms.txt and JSON-LD; Search Master can serve the files for you.
  • Real 404s and 301s, small client bundles, cached public pages.
  • Check the live site regularly with a health check, not just your code.
Host it with us

Node.js Hosting from ₹2,988/year

Run Express APIs and Next.js apps on the Node.js version you choose, with environment variables, logs and a set RAM allowance. Node.js 18, 20, 22, 24 or 26 · From 256 MB app RAM · Your code from Git or a ZIP.

Ready when you are

Hosting from ₹149 a month on servers in India

WordPress, static HTML, PHP, Node.js, Python and Java plans with free SSL and your choice of version. Create your account, pick a plan and pay by UPI, card or netbanking; your hosting is created automatically and you get your login by email, usually within minutes.

Questions

Questions on this topic

Is Next.js good for SEO?

Yes, when public pages are rendered on the server or statically generated so their HTML contains the content. Pages that render only in the browser are weaker for search and invisible to many AI fetchers.

What is the best SEO tool for Next.js?

Use the Metadata API in code plus a tool that checks the live site. On Cloud Ninza, Search Master (Growth, Business, Pro) gives a health check, page scores, served robots.txt, sitemap.xml and llms.txt, IndexNow and schema without changing your code.

Do AI assistants run JavaScript?

Most fetchers used while answering read the HTML only. Server-render your important content.

How do I add llms.txt to Next.js?

Put llms.txt in the public folder or create a route that returns text/plain. On Cloud Ninza you can let Search Master generate and serve it instead.

Should I use the Pages Router or App Router for SEO?

Both can be excellent. What matters is server or static rendering and correct metadata per page.

How do I stop preview deployments being indexed?

Send a noindex robots header or meta tag on every host except production.

Does Express need a sitemap?

Yes, any public website benefits. Generate it from your routes or database, or let Search Master build one.

Will a page cache break a logged-in dashboard?

Not with Ninza Speed: requests carrying cookies or an Authorization header always reach your app.