Pinlist / Guides
How to Add Schema Markup to a Website
Make the JSON-LD block, paste it into the <head> of the page it describes, publish, and check the live page in Google's Rich Results Test. Step one is below.
Example details are filled in. Replace them with yours; the code updates as you type.
More details (optional)
Copy the cells, header row included, and paste here. Columns: name, street, city, state, zip, phone, url, hours. Tabs or commas both work.
Paste it into the page's <head>, then check it in Google's Rich Results Test.
Where to put JSON-LD
In the <head> of the page it describes is the usual place. Google also reads JSON-LD placed in the <body>, which helps on site builders that only let you add an HTML block. Put the block on the page the business details belong to: the home page of a one-location business, or each location's own page.
Paste the block exactly as copied, from <script type="application/ld+json"> to </script>. One missing quote or comma and the whole block is ignored, which is why the test step matters.
How to test schema markup
Google's Rich Results Test shows whether Google reads the block and which rich results it could use. The Schema Markup Validator checks the block against schema.org itself. Both take a live address or pasted code.
Add LocalBusiness schema in three steps
- Make the blockFill in your details in the generator on this page and click Copy code.
- Paste it into the pagePaste the whole block, script tags included, into the page's head, or into an HTML block in the page body if your site builder has no head setting.
- Test the live pagePublish, then enter the page's address in Google's Rich Results Test and the Schema Markup Validator, and fix anything they flag.
Questions
Do I need a developer to add schema?
No. If you can edit a page's HTML or your site builder has a code setting, you can paste the block. Site-specific steps: WordPress, Squarespace, Wix and Shopify.
Can I put the same block on every page?
Put a location's block on that location's page. Repeating it site-wide adds nothing and can confuse which page is about the business.
How long until Google reads it?
Google reads it the next time it crawls the page, which can take days. The Rich Results Test reads it at once.