Your Next.js or custom site, cited by AI search.
On a custom site, everything AI crawlers need is in your code. Citable’s audit tells you which file to change, measures whether AI cites you, and delivers sourced articles to your own blog through a signed webhook or the REST API.
Why AI cites (or skips) Next.js sites
Most AI crawlers don’t run JavaScript. A page rendered on the server (or generated statically) gives them the full text; a page that fills itself in the browser gives them an empty shell. With Next.js you choose per page, so it’s worth checking.
When the audit detects Next.js it speaks to whoever writes the code: for each problem it names the place to change (app/robots.ts, the page’s metadata, app/sitemap.ts…). The weekly measurement then shows which questions AI answers with someone else’s page, and Citable writes the articles.
What gets in the way on Next.js
Citable’s weekly audit recognises Next.js and, for each problem, gives you the steps in Next.js itself.
01
Content that only appears with JavaScript
If the text arrives after a client-side fetch, the audit reports an empty JavaScript shell or little text. Render it on the server or generate it statically.
02
robots, sitemap and llms.txt in code
robots in app/robots.ts (or public/robots.txt), the sitemap in app/sitemap.ts and llms.txt in public/llms.txt. The audit gives you the corrected robots rules when an AI search crawler is blocked.
03
noindex set too broadly
The robots field of a page’s metadata, or an X-Robots-Tag header in next.config, can hide pages you want cited. Remove it only on those pages, never in app/layout.tsx: log-in, cart or search pages should keep theirs.
04
Metadata, canonical and language
Title and description in each page’s metadata, the canonical in alternates.canonical, the language in <html lang> in app/layout.tsx and one <h1> per page.
Connect Next.js to Citable
Takes a few minutes. Every article then arrives in your CMS, as a draft or published on its own, depending on how you set publishing.
- 1
Create your Citable account and add your site: website, competitors and buyer questions.
- 2
Open Settings → CMS & publishing for that site and choose Next.js.
- 3
Add the route handler from the example to your Next.js app and deploy it.
- 4
Paste its URL in Citable as a webhook.
- 5
Store the signing secret in your app’s environment (CITABLE_WEBHOOK_SECRET).
- 6
In the same tab, choose how articles get published: scheduled with an approval window, or Drafts only.
What you need
- A route in your app that receives a POST and verifies the signature (example below)
- Or an API key (Developers page) to read articles with GET /api/v1
What Citable publishes on Next.js
Draft or live
Same as the webhook: a draft unless automatic publishing is on. Or pull articles yourself from the API v1 when you want.
Unpublish from Next.js
The webhook sends title, slug, summary, HTML and markdown, JSON-LD (Article and FAQPage), images with their alt text, sources, language, tags and date, signed with X-Citable-Signature. It sends “publicar: false” unless automatic publishing is on; your receiver decides what to do and replies with the id (and the URL if it goes live).
Fields we fill
- Markdown and HTML of the article
- Title, slug, summary, JSON-LD, images and sources
Citable on Next.js: questions
What people ask before they start. If something’s missing, write to us.
Write to usDo I have to use Next.js?
No. The webhook is a signed POST to any HTTPS URL, so it works with any stack, and with Zapier, Make or n8n. The Next.js route handler on the integrations page is just a ready-made example.
Can I pull articles instead of receiving them?
Yes. Create an API key on the Developers page and read articles (markdown, HTML, sources, FAQ) with the REST API v1.
How do I verify the webhook?
Check the X-Citable-Signature header (t=…,v1=…) with HMAC-SHA256 over “t.body” using the secret shown once when you connect, and reject timestamps older than 5 minutes. Your endpoint must answer within 10 seconds.
Will AI crawlers read my Next.js site?
If the pages are rendered on the server or statically, yes, unless robots or noindex block them. Citable’s weekly audit checks both from outside.
Can Citable promise AI will cite my site?
No, and nobody can. Citable measures every week how often each AI mentions and cites you, with a confidence range, publishes sourced articles for the gaps and shows when a published URL starts being cited.
See what AI says about you before connecting anything.