Next.js

SEO and AI visibility for Next.js sites

The @gralus/next package lets a Next.js site show the titles, descriptions, articles and landing pages you approve in Gralus, without a new deploy. If Gralus can't be reached, the site keeps the last changes it read.

14-day free trial, no card. Nothing is published without your approval.

What the package serves

For a site built with Next.js 15 or newer and the App Router. Everything here comes from what you approve in Gralus.

Titles and descriptions
For each page, read through Gralus when the page renders. Pages keep their own until a fix is approved.
llms.txt
The short file that tells AI assistants what the business does and lists its main pages.
AI crawler access
robots.txt rules for the AI crawlers you choose, added to the site's own rules.
LocalBusiness markup
Your business details as structured data, and Bing's verification tag on the home page.
Articles and landing pages
Articles at /blog/<slug> and landing pages at /p/<slug>, inside the site's own header and footer, with Article and FAQ markup.
IndexNow key
The key file at /gralus-indexnow.txt, so Gralus can tell Bing and other IndexNow search engines about new and changed pages.

Changes without a deploy

When you approve a fix, Gralus asks the site to refresh, and the change shows within a minute. Undo works the same way. Every request between Gralus and the site is signed with the site's key.

If gralus.com can't be reached, the site keeps showing the last changes it read, articles and landing pages included (from version 0.5.1). A site that never read its changes, or whose key Gralus no longer accepts, shows its own titles and files.

Set it up

No server access is needed, only the site's code and its environment settings.

  1. 1

    Make the site key

    In Gralus, open Settings → Next.js site and click Make the site key. Send the steps to your developer from there if someone else builds the site.

  2. 2

    Install the package

    In the project's folder, run the npm install line shown on that page.

  3. 3

    Run init

    Run npx gralus-next init. It adds the Gralus route, llms.txt, robots.txt, the business markup and the article and landing page routes. Add --dry-run to see the changes first.

  4. 4

    Add two settings

    Add GRALUS_SITE_ID and GRALUS_SITE_KEY to the site's environment (Vercel or Netlify settings, or .env) and deploy once.

  5. 5

    Test the connection

    Click Test connection in Gralus. From then on, approved changes show without a deploy.

npm install https://gralus.com/downloads/gralus-next-0.5.1.tgz
npx gralus-next init

What init changes, and what it leaves

npx gralus-next init refuses to run while the project has changes not committed to git, so what it changes can be seen and undone. It lists every page it left alone and why, and running it again changes nothing. If the site already uses /blog or /p, it picks free addresses and says which settings to add.

Text written into the site's code, such as a heading or a paragraph, stays a task for whoever builds the site. Internal links, alt text and speed changes are made by the WordPress plugin, so they don't apply to Next.js pages. See the Next.js docs for every detail.

Next.js with a WordPress blog

Some sites run WordPress for a blog next to a Next.js app. Connect both: articles, landing pages and fixes to WordPress pages go to WordPress through the Gralus plugin; titles and descriptions of the other pages, llms.txt, AI crawler access and LocalBusiness markup go to the Next.js app.

Check your Next.js site first

See whether AI crawlers can read the site, and whether it has llms.txt and structured data. Free, no sign-up.

Free. No account needed. The check only reads public pages.

Questions about Next.js

Which Next.js versions work?

Next.js 15 or newer, with the App Router.

Do I need to deploy for each change?

No. Deploy once after setup. After that, approved titles, descriptions, articles and pages show within a minute, and Undo works the same way.

What happens if gralus.com is down?

The site keeps showing the last changes it read, articles and landing pages included.

Is the site key emailed to my developer?

No. The steps can be emailed with the site id filled in, but the key never is. Give it to them yourself.

How do I update the package?

Settings → Next.js site shows when a new version is out. Run the npm install line shown there, run npx gralus-next init again, then deploy.

Read next

More in the docs, every feature and pricing.