How to add FAQ schema on any website platform

Mark up your existing FAQ answers so search engines and AI assistants can quote them directly. The code is the same everywhere; where you paste it is not. This covers 35 platforms, 19 of which gate custom code behind a paid plan.

Why this matters

An FAQ page is readable by a person but ambiguous to a machine — nothing in the HTML says which text is a question and which is its answer. FAQPage structured data removes the guesswork by labelling each pair explicitly. That matters more now than it did for rich results alone: answer engines lean heavily on structured data when deciding what a page actually asserts, and an unmarked FAQ is far easier to skip than a marked one.

What you paste

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "How long does delivery take?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Orders placed before 2pm ship the same working day and arrive in 2-3 working days."
      }
    }
  ]
}
</script>

One Question object per question, each with exactly one acceptedAnswer. Replace the example with your own wording — the answer text must match what a visitor sees on the page.

Where it goes, by platform

The code is identical everywhere. The screen you paste it into is not, and neither is whether your plan allows it — 19 of 35 platforms require a paid plan for custom code.

PlatformWhere it goesPlan needed
ShopifyOnline Store → Themes → Edit code → layout/theme.liquidAll plans can edit theme code. Checkout pages are restricted to Shopify Plus.
WooCommerceThe parent theme's Head.php, or a code-snippets pluginNo plan gate — WooCommerce is self-hosted, so you control the code.
BigCommerceStorefront → Script ManagerScript Manager is available on all plans.
Adobe CommerceContent → Design → Configuration → HTML Head / HeadAvailable on Adobe Commerce and Magento Open Source alike.
PrestaShopThe theme's templates/_partials/Head.tplSelf-hosted, so no plan gate.
EcwidThe host page, not Ecwid itselfCustom code on Instant Site requires a paid plan.
Squarespace CommerceSettings → Developer Tools → Code Injection → HeadCode Injection requires a Business plan or higher.
OpenCartcatalog/view/theme/<theme>/template/common/Head.twigSelf-hosted, so no plan gate.
Shift4ShopSettings → Design → Themes & Styles → Edit TemplateTemplate editing is available on all paid plans.
WordPressThe active theme's Head.php, or a code-snippets pluginSelf-hosted WordPress has no gate. WordPress.com requires a Business plan for custom code.
WebflowProject settings → Custom code → Head codeCustom code requires a paid Site plan; it is not available on the free staging domain alone.
SquarespaceSettings → Developer Tools → Code Injection → HeadCode Injection requires a Business plan or higher. Personal plans cannot add custom code.
WixSettings → Custom Code → Add Custom CodeCustom code requires a paid Premium plan and a connected domain.
FramerSite settings → General → Custom Code → End of <Head>Custom code requires a paid site plan.
GhostSettings → Code injection → Site HeadAvailable on Ghost(Pro) and self-hosted alike.
WeeblySettings → SEO → Head CodeCustom code requires a paid plan.
DudaSettings → Head HTML / Head HTMLAvailable on all paid Duda plans.
CarrdAn Embed element set to Code, placed at the end of the pageEmbed elements require Carrd Pro.
BubbleSettings → SEO / metatags → Script in the HeadCustom code requires a paid Bubble plan.
SoftrSettings → Custom code → HeadCustom code requires a paid plan.
Next.jsapp/layout.tsx, using next/scriptNone — you control the code.
Reactpublic/index.html, before the closing </Head> tagNone.
Vueindex.html, before the closing </Head> tagNone.
Nuxtnuxt.config.ts, under app.head.scriptNone.
Astrosrc/layouts/Layout.astro, before </Head>None.
SvelteKitsrc/app.html, before %sveltekit.Head% closesNone.
Gatsbygatsby-ssr.js, via onRenderHeadNone.
Hugolayouts/partials/Head.htmlNone.
Jekyll_layouts/default.html or _includes/Head.htmlNone.
plain HTMLEvery page's closing </Head> tagNone.
HubSpot CMSSettings → Website → Pages → Site Head HTMLAvailable on CMS Hub Starter and above.
DrupalThe theme's html.html.twig, or the Asset Injector moduleSelf-hosted, so no plan gate.
JoomlaThe template's index.phpSelf-hosted, so no plan gate.
Notion sitesA hosting layer such as Super or Potion, not Notion itselfDepends on the hosting layer; most require a paid plan for custom code.
Shopify Hydrogenapp/root.tsx, inside the document HeadNone beyond your Shopify plan.

How to check it worked

  • Load the page and view source; the JSON-LD block should be present in the served HTML, not injected later by JavaScript.

  • Run the URL through Google's Rich Results Test and confirm it detects FAQPage with the right number of questions.

  • Check that every answer in the markup appears verbatim on the visible page — markup that does not match the page is a guidelines violation.

What goes wrong

  • Marking up questions that are not visible on the page. The structured data has to describe what a visitor can actually read.

  • Putting FAQPage on a page that is not an FAQ. Product pages with a couple of questions are better served by leaving it off.

  • Escaping errors in the JSON. A single unescaped quote invalidates the whole block silently.

Questions

Will this get me rich results?
Possibly, but treat that as a bonus rather than the point. The reliable benefit is that machines can now tell exactly which text answers which question, which matters for AI answer engines regardless of how search results look this year.
How many questions should I mark up?
All the ones genuinely on the page. There is no threshold that unlocks anything — the markup should simply be a faithful description of the page.

Related

term

What is answer engine optimization (AEO)?

Search increasingly returns synthesised answers rather than links. AEO is the unglamorous work of making sure the facts about your business — what it is, who it's for, what it costs — are stated plainly enough to be quoted correctly.

term

What is a knowledge base?

Traditionally a knowledge base is a help centre humans read. For AI support it is the source material a representative answers from — which means an ordinary website, well written, can serve as one without a separate help centre.

platform

How to add an AI chatbot to Shopify

You add an AI chatbot to Shopify by pasting a script tag into your theme's theme.liquid file, just before the closing body tag. It takes about two minutes, needs no app install, and survives theme updates as long as you don't switch themes entirely.

platform

How to add an AI chatbot to WordPress

The safest way to add an AI chatbot to WordPress is a code-snippets plugin or your theme's built-in footer-scripts field — not editing footer.php, which a theme update will overwrite. All three methods take under five minutes.

platform

How to add an AI chatbot to Webflow

In Webflow you add an AI chatbot under Site Settings → Custom Code → Footer Code, then publish. The step people miss is publishing — custom code does not appear on the live site until you do, and it never appears in the Designer preview.

platform

How to add an AI chatbot to Squarespace

Squarespace has a Code Injection panel built for exactly this. Paste your snippet into the Footer field under Settings → Advanced → Code Injection and it appears site-wide. You need a Business plan or higher — Personal plans cannot run custom code.

While you are in that field.

RubyRep installs through the same screen, in the same visit. Enter your site and we will read it and hand you the line to paste.

https://

Takes about a minute. No credit card.

All how-to guides