How to Add Schema Markup to Shopify
How to add JSON-LD schema to theme.liquid, edit robots.txt.liquid, and which Shopify plan tier you need for theme code access.
Updated September 21, 2026
Shopify is an ecommerce platform where schema markup is added by editing theme files directly, since there is no built in schema generator in the admin. Editing theme code and robots.txt.liquid both happen in the same place: the theme's code editor.
Plan requirement
Editing theme code requires access to a full theme, which the entry level Starter plan does not include. Starter plan stores are limited to the Spotlight theme and cannot open a theme editor or edit theme files at all, since Starter is built for selling through social links and a simple checkout rather than a themed storefront. You need the Basic plan or higher to reach Edit Code and add schema to theme.liquid.
Click path for theme.liquid
1. From the Shopify admin, go to Online Store. 2. Find your live theme, click the actions menu, then Edit code. 3. In the Layout folder, open theme.liquid. 4. Paste your script tag with type application/ld+json just before the closing head tag, or use a Liquid include so the schema only loads on the templates that need it. 5. Click Save.
For schema that should only appear on product or location pages rather than every page, add the JSON-LD to that specific template file (for example product.json or a location section) instead of theme.liquid, so you are not printing the same Organization block sitewide when a page specific block would be more accurate.
Click path for robots.txt.liquid
1. From Online Store, open Edit code for your theme. 2. In the Templates folder, right click and choose Add a new template. 3. Select robots, then Create template. This generates robots.txt.liquid pre filled with Shopify's default rules. 4. Edit the Liquid inside to add, remove, or adjust Disallow, Allow, or Sitemap lines, keeping the existing Liquid logic in place where possible so future Shopify updates to the default rules still apply. 5. Save.
What is not possible
Shopify explicitly labels robots.txt.liquid edits as an unsupported customization: support will not help you fix a mistake in the file, and an incorrect rule can block your entire store from search results. There is also no native JSON-LD editor in the Shopify admin outside of theme code. Shopify's theme structured_data Liquid filter automatically emits Product schema on product pages, so adding your own Product JSON-LD on top of it in theme.liquid usually creates duplicates rather than filling a gap.
How to verify
View the live page's source and confirm the application/ld+json block appears once, not duplicated with Shopify's automatic Product schema. Run the page through a structured data testing tool to catch syntax errors, since Shopify does not validate the JSON you paste into theme.liquid. Fetch yourdomain.com/robots.txt directly in a browser to confirm your Liquid changes rendered correctly. Then check what crawlers actually see with the AI Crawler Checker, and use the Local Business Schema Generator to build the LocalBusiness block for a store locator or physical location page. Get your overall score at /#score.
Related tools
- LocalBusiness Schema Generator
Build a paste-ready LocalBusiness JSON-LD block with the correct subtype.
- AI Crawler Checker
Check your live robots.txt against the crawlers that feed every major AI engine.
- llms.txt Generator
Turn your business summary and key pages into a valid llms.txt file.
Frequently asked questions
- Can I add schema markup on the Shopify Starter plan?
- No. Starter plan stores are locked to the Spotlight theme and do not include a theme code editor, so there is no way to open theme.liquid or add a robots.txt.liquid template. You need the Basic plan or higher for theme code access.
- Will my custom schema duplicate what Shopify already generates?
- It can. Shopify's theme structured_data Liquid filter already emits Product schema on product pages automatically. Adding your own Product JSON-LD in theme.liquid on top of that usually creates two competing Product blocks rather than filling a real gap.
- How do I edit Shopify's robots.txt file?
- Open Edit code for your theme, right click the Templates folder, choose Add a new template, select robots, and Create template. This generates robots.txt.liquid with Shopify's defaults, which you can then edit directly in the code editor.
- Is editing robots.txt.liquid supported by Shopify?
- No. Shopify calls it an unsupported customization and states support cannot help with mistakes in the file. An incorrect Disallow rule can block your entire store from search results, so test carefully and keep a copy of the original file before changing it.
Sources
- https://help.shopify.com/en/manual/online-store/themes/customizing-themes/edit-code
- https://help.shopify.com/en/manual/promoting-marketing/seo/editing-robots-txt
- https://shopify.dev/docs/storefronts/themes/seo/robots-txt
- https://help.shopify.com/en/manual/intro-to-shopify/pricing-plans/plans-features/shopify-starter-plan
Check your business
See whether ChatGPT and Perplexity already recommend you, free, with no card and no sales call.