AnswerFix

How to Add Schema Markup to Squarespace

How to add JSON-LD schema through Squarespace Code Injection, the plan tier it requires, and why you cannot edit Squarespace's robots.txt file directly.

Updated September 21, 2026

Squarespace is a hosted website platform that adds custom schema through a feature called Code Injection rather than a theme file or plugin, and it locks robots.txt entirely so you cannot edit it directly.

Plan requirement

Code Injection is available on Squarespace's Core, Plus, and Advanced plans, the current paid tiers, and is not available on the entry level plan below them. If Settings does not show a Code Injection option, you need to upgrade before adding JSON-LD schema this way.

Click path

1. Open the Home Menu, go to Settings, then Advanced, then Code Injection. 2. Paste your script tag with type application/ld+json into the Header field to apply it site wide, or the Footer field if the script does not need to run early. 3. Click Save. 4. For a single page instead of the whole site, hover over that page in the Pages panel, click the gear icon, click Advanced, and use the Page Header Code Injection field there.

Site wide Organization or WebSite schema belongs in the main Settings, Advanced, Code Injection header field. A LocalBusiness or Product schema specific to one location or product page belongs in that page's own Page Header Code Injection field instead, so you are not repeating the same block on every page.

What is not possible

Code Injection does not run on checkout pages, so you cannot add schema, or any custom code, to a cart or checkout step. It also will not accept server side code, only HTML, CSS, and JavaScript wrapped correctly in tags. Squarespace generates one robots.txt file for every site on the platform and does not let you view or edit it directly. Instead, Settings, then Crawlers, gives you toggles: a checkbox to block known AI crawlers as a group, and a separate control for standard search engine crawlers. You cannot write a custom Disallow rule for one bot, allow one path while blocking another, or add your own Sitemap line. The toggle system is the entire interface.

The AI crawler default

A new Squarespace site ships with Block known artificial intelligence crawlers unchecked, meaning AI bots can crawl the site by default. If you want tools like ChatGPT or Perplexity to be able to read and cite your pages, leave that box unchecked. Checking it removes you from their crawls, which also means AI answer engines cannot cite you.

How to verify

After saving Code Injection, view the published page's source and confirm the application/ld+json block appears where you expect it, not duplicated in both the site wide and page level fields. Run the page through a structured data testing tool, since Squarespace does not validate your JSON before publishing. Check Settings, Crawlers, to confirm the AI crawler toggle matches your intent, then use the AI Crawler Checker to see what bots can actually reach your live pages from the outside. Build your JSON-LD with the Local Business Schema Generator before pasting it in, and get your overall visibility score at /#score.

Related tools

Frequently asked questions

What plan do I need for Code Injection on Squarespace?
Core, Plus, or Advanced, Squarespace's current paid tiers. The entry level plan below these does not include Code Injection, so the Settings, Advanced menu will not show the option until you upgrade to a plan that supports custom code.
Can I edit robots.txt on Squarespace?
No. Every Squarespace site shares one system generated robots.txt file that you cannot view or edit directly. Instead, Settings, then Crawlers, gives you a checkbox to block known AI crawlers and a separate toggle for search engine crawlers, which is the full extent of your control.
Where do I put schema for one page versus the whole site?
Site wide schema, like Organization, goes in Settings, Advanced, Code Injection Header field. Page specific schema, like a LocalBusiness entry for one location, goes in that page's own settings gear icon, then Advanced, then Page Header Code Injection.
Does Squarespace block AI crawlers by default?
No. New sites ship with Block known artificial intelligence crawlers unchecked, so bots from ChatGPT, Perplexity, and similar tools can crawl the site unless you deliberately check that box in Settings, Crawlers, which would also stop them from citing your pages.

Sources

Check your business

See whether ChatGPT and Perplexity already recommend you, free, with no card and no sales call.