What schema markup is and why it matters
Schema markup is code you add to your website that tells search engines what your content means. Without it, a search engine sees text and links. With it, a search engine understands that a block of text is a recipe, a product price, a business address, or a review. This understanding helps search engines display your pages in richer, more useful ways — and can make your listing stand out in search results.
Schema markup does not change how your page looks to visitors. It is invisible HTML that sits in the background. Search engines read it to understand the structure and meaning of your content, and they use that understanding to decide how to present your page in results. A recipe site with schema markup might show cooking time and star ratings directly in the search result. A local business with schema markup might show its address, phone number, and hours without the visitor clicking through first.
The most common schema types are Organization (for business information), LocalBusiness (for shops and services with a physical location), Product (for items you sell), Recipe, Article, and Review. You do not need to use all of them — only the ones that match what your pages actually contain.
Key Takeaways
- Schema markup is HTML code that describes what your content is, helping search engines understand and display it more accurately in results.
- You can add schema markup by hand using JSON-LD format, or use a plugin if your site runs WordPress or another platform with built-in schema tools.
- Google's Rich Results Test shows you whether your schema markup is correct and how Google will display your page in search results.
- Start with one schema type that matches your actual content — Organization for a business site, Product for an e-commerce page, or Article for a blog.
- Schema markup does not may provide higher rankings, but it can make your listing more visible and clickable when search engines do show it.
Understanding JSON-LD, the easiest format to use
Schema markup can be written in three formats: JSON-LD, Microdata, and RDFa. JSON-LD is the format Google recommends and the one most people use, because it is the simplest to write and the easiest to place on your page without breaking anything.
JSON-LD looks like a block of code wrapped in <script> tags. You paste it into the HTML of your page — usually in the head section or just before the closing body tag — and it sits there without affecting how the page displays. The code is structured like a list of properties: a name, a description, an address, a price, whatever applies to that piece of content.
You do not need to write JSON-LD from scratch. Schema.org, the organization that maintains the schema standard, provides templates for every schema type. You fill in the blanks with your actual information, and you have working code ready to paste. Google's Structured Data Markup Helper also walks you through building schema for a specific page.
Adding schema markup by hand using JSON-LD
Start by deciding which schema type matches your content. If you run a restaurant, use LocalBusiness. If you sell products, use Product. If you publish articles, use Article. Go to schema.org, find that type, and look at the example code.
Open the HTML editor for the page where you want to add schema. Most website builders have a way to edit HTML directly — look for a "Code" or "HTML" button, or check your platform's documentation. Copy the example code from schema.org and paste it into your page's HTML.
Replace the placeholder values with your actual information. If the example says "name": "Example Business", change it to your business name. If it says "telephone": "555-0000", change it to your real phone number. Keep the quotation marks and commas exactly as they are — JSON is strict about formatting, and a missing comma will break it.
Save the page and wait a few minutes for the change to take effect. Then go to Google's Rich Results Test, paste your page's URL, and click Test. Google will show you whether the schema markup is correct and how your page will appear in search results with that markup applied.
Using a plugin if you run WordPress
If your site runs WordPress, you can add schema markup without touching code. Plugins like Yoast SEO, Rank Math, and All in One SEO include schema markup tools built in.
Install and activate the plugin, then go to the page or post where you want to add schema. The plugin will show a new section in the editor with options for schema type, business name, address, phone number, and other fields. Fill in the fields that apply to that page, and the plugin generates the JSON-LD code for you and places it on the page automatically.
Different plugins have different interfaces, but the process is similar: choose a schema type, fill in the blanks, and save. The plugin handles the code. You can test the result the same way — paste the URL into Google's Rich Results Test and see how it looks.
Most WordPress plugins also let you set a default schema for your whole site — your business name, logo, and contact information that appears on every page. This saves time if you have many pages and do not want to enter the same information repeatedly.
Testing your schema markup with Google's tools
Google's Rich Results Test is the most important step after adding schema markup. It shows you whether your code is correct and how Google will actually display your page in search results.
Go to Google's Rich Results Test (search for it by name), paste your page's URL into the box, and click Test. Google will crawl the page and report back. If the schema markup is correct, you will see a green checkmark and a preview of how your page will look in search results — including any special features like star ratings, cooking time, or product price.
If there is an error, Google will tell you what is wrong and where. Common mistakes are missing required fields (like a product price), typos in the code, or incorrect formatting. Fix the error, save the page, and test again. You may need to wait a few minutes for Google to re-crawl the page.
Testing does not mean your page will immediately appear with rich results in actual search results. It only means the schema markup is correct and Google understands it. Whether Google actually displays those rich results depends on other factors, including how relevant your page is to the search query and how much traffic your site gets.
Common schema types and what they do
Organization tells search engines about your business — name, logo, contact information, social media profiles. Use this on your homepage or an About page. It helps search engines understand who you are and can make your business card appear in search results.
LocalBusiness is for businesses with a physical location — a restaurant, shop, salon, or office. It includes address, phone number, hours, and a map. Use this if customers can visit you in person. Search engines use it to show your location and hours directly in results.
Product describes something you sell — name, price, description, image, and reviews. Use this on product pages in an online store. Search engines use it to show price, availability, and star ratings in results, which can make your listing more clickable.
Article describes a blog post or news story — headline, author, publish date, and content. Use this on blog posts. Search engines use it to show the author and publish date in results, which can help readers decide whether to click.
Review describes a rating or review of a product, business, or service — the reviewer's name, the rating, and the review text. Use this if you publish customer reviews on your site. Search engines use it to show star ratings in results.
What schema markup does and does not do
Schema markup does not improve your search ranking. Google has said many times that schema markup alone does not make your page rank higher. It helps search engines understand your content, but understanding is not the same as ranking.
What schema markup does do is make your listing more visible and clickable when your page does appear in results. A product listing with a price and star rating gets more clicks than one without. A recipe with cooking time and ratings gets more clicks. A local business with hours and a phone number gets more clicks. These higher click rates can indirectly help your ranking, but the schema markup itself is not a ranking factor.
Schema markup also helps search engines decide whether to show your page in special result types — like Google's Rich Results, Knowledge Panels, or featured snippets. If you do not have schema markup, you cannot appear in those special formats, even if your content would be perfect for them.
Frequently Asked Questions
Do I need schema markup on every page?
No. Add schema markup only to pages where it matches the actual content. If you have a blog, add Article schema to blog posts but not to your homepage. If you run a restaurant, add LocalBusiness schema to your contact page but not to your menu page. Irrelevant or incorrect schema markup can confuse search engines more than no schema markup at all.
What if I add schema markup and nothing changes in search results?
Schema markup does not may provide that search engines will display your page differently. It only tells them what your content is. Search engines decide whether to show rich results based on many factors, including how relevant your page is and how much traffic your site gets. New sites or pages with little traffic may not see rich results even with correct schema markup.
Can I use multiple schema types on one page?
Yes. A product page might have both Product schema and Organization schema. An article might have both Article schema and Review schema if it reviews something. Use multiple types only if they all accurately describe the page. Do not add schema types just to add them.
What happens if my schema markup has an error?
Search engines will ignore the broken schema markup and treat the page as if it has no schema at all. Your page will still appear in search results normally — schema markup is optional. Fix the error by testing with Google's Rich Results Test, which will tell you exactly what is wrong and where.
Do I need to update schema markup if my information changes?
Yes. If your business address, phone number, or hours change, update the schema markup to match. If you add new products or write new articles, add schema markup to those pages too. Outdated schema markup can confuse search engines and visitors, so keep it current.