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, not just what words it contains. Without it, a search engine sees a page about a local plumber and reads the text, but doesn't automatically know the phone number, address, hours, or customer reviews. Schema markup labels those pieces so Google, Bing, and other search engines can read them correctly and show them in search results.

When you add schema markup, search engines can display your information in richer ways — showing your business hours directly in search results, displaying star ratings, or listing your upcoming events. This makes your listing stand out and gives people the information they need before they click. It also helps search engines index your site more accurately, which can improve where you appear in results.

Schema markup does not may provide higher rankings. It is a way to communicate clearly with search engines about what your content actually is. The payoff is visibility and trust: people see more details about your business before they visit, and search engines understand your site better.

Key Takeaways

  • Schema markup uses a standard language called JSON-LD that you paste into your website's code to label what different pieces of content mean.
  • The most useful types for small businesses and local websites are LocalBusiness, Event, Product, and Article — each one tells search engines what kind of thing the page is about.
  • You can add schema markup by editing your website's HTML directly, using a plugin if you run WordPress, or using Google's free Schema Markup Helper tool to generate the code.
  • After you add schema markup, test it with Google's Rich Results Test to make sure search engines can read it correctly before it goes live.
  • Schema markup takes time to show up in search results — usually a few weeks to a few months after you add it and Google re-indexes your pages.

The three ways to add schema markup to your website

The method you use depends on what kind of website you have and how comfortable you are editing code. All three produce the same result — search engines read the markup the same way regardless of how you added it.

Method 1: Edit your HTML directly. If you have access to your website's code (through a hosting control panel, a code editor, or your website builder's HTML section), you can paste schema markup directly into the <head> section of your page. This is the most reliable method because you control exactly what gets added. You will need to find the right place in your code and make sure the markup is formatted correctly, but there is no middleman between you and the search engine.

Method 2: Use a WordPress plugin. If your website runs on WordPress, plugins like Yoast SEO, Rank Math, or Schema Pro let you add schema markup through a form instead of editing code. You fill in fields (business name, address, phone number, hours) and the plugin generates the correct markup and places it on your pages automatically. This is the easiest method if you use WordPress, because the plugin handles the formatting for you.

Method 3: Use Google's Schema Markup Helper. Google offers a free tool at schema.google.com that walks you through creating schema markup without writing code. You paste in your page's URL or HTML, select the type of content (LocalBusiness, Event, Product, etc.), highlight the relevant information on your page, and the tool generates the markup for you. You then copy the generated code and paste it into your website. This method is good for learning what schema markup looks like and for adding it to a single page or a few pages, but it is slower if you need to add markup to many pages.

Which types of schema markup matter most for your website

Schema.org (the organization that maintains the schema standard) defines hundreds of content types. Most websites only need a handful. Start with the ones that match what your website actually contains.

LocalBusiness is for any business with a physical location or service area. It includes your business name, address, phone number, hours, and a description. Search engines use this to show your business in local search results and on Google Maps. If you have a storefront, office, or service area, add this to your homepage.

Event is for conferences, classes, performances, or anything that happens at a specific time and place. It includes the event name, date, time, location, and a description. Search engines display events in a special event carousel in search results. If you list events on your website, add this markup to each event page.

Product is for items you sell or describe in detail. It includes the product name, description, price, availability, and customer reviews. Search engines show product prices and ratings directly in search results. If you sell products or have detailed product pages, add this markup.

Article is for blog posts, news articles, and long-form content. It includes the headline, publication date, author, and a description. Search engines use this to understand when content was published and who wrote it, which affects how they rank and display it. If you publish articles or blog posts, add this markup to those pages.

Organization is for your company's main identity — name, logo, contact information, and social media profiles. Add this once to your homepage or your main about page. It helps search engines understand who you are across your entire website.

How to generate schema markup using Google's free tool

Google's Schema Markup Helper is the easiest way to create markup if you are new to schema. Go to schema.google.com and choose whether you want to paste in your page's URL or paste in the HTML code directly. If your page is already live on the internet, paste the URL. If you are working on a page that is not yet published, paste the HTML.

Next, select the type of content from the dropdown menu — LocalBusiness, Event, Product, Article, or another type that matches your page. The tool will show your page on the left side of the screen. On the right side, you will see a list of fields that the tool recognizes (like business name, address, phone number). Highlight the relevant text on your page, and the tool will match it to the correct field. For example, highlight your business name, and the tool will tag it as the business name. Highlight your address, and it will tag it as the address.

Once you have highlighted all the important information, click the "Create HTML" button at the bottom. The tool will generate a block of code in JSON-LD format. Copy this entire code block and paste it into your website's <head> section (the top part of your page's HTML, before the visible content). Save your changes and test the markup with Google's Rich Results Test (see the next section).

Testing your schema markup before it goes live

Before you publish your schema markup, test it to make sure search engines can read it correctly. Use Google's Rich Results Test at search.google.com/test/rich-results. Paste in your page's URL or paste the HTML code directly, and the tool will scan your markup and tell you whether it is formatted correctly.

If the test finds errors, it will show you exactly what is wrong — for example, a missing required field, a date in the wrong format, or a typo in the code. Fix these errors before you publish. If the test shows warnings (non-critical issues), you can usually publish anyway, but fixing warnings makes your markup stronger.

The Rich Results Test also shows you a preview of how your content might appear in search results with the schema markup applied. This preview is not may provide — search engines do not always show rich results for every type of content — but it gives you an idea of what you are working toward.

How long it takes for schema markup to show up in search results

After you add schema markup to your website and publish it, search engines need time to re-index your pages and recognize the markup. This usually takes two to four weeks, though it can take longer depending on how often Google crawls your site. Pages that get frequent updates and links tend to be re-indexed faster.

You can speed this up slightly by telling Google about the change. Go to Google Search Console (the free tool Google provides for website owners), select your website, and click "Request Indexing" for the page you updated. This tells Google to re-crawl that page sooner, but it does not may provide when ready results.

Even after Google re-indexes your page, it may not show rich results (the enhanced display with ratings, prices, hours, etc.) right away. Search engines test schema markup to make sure it is accurate before they display it prominently. Be patient — if your markup is correct, it will show up.

Common mistakes to avoid when adding schema markup

The most common mistake is adding schema markup that does not match your actual content. For example, adding a Product schema to a page that does not sell anything, or adding an Event schema with a date that has already passed. Search engines notice when markup contradicts what the page actually says, and they may ignore the markup or penalize your site. Only add schema markup that accurately describes what is on the page.

Another mistake is using the wrong schema type. If you have a blog post, use Article, not Product. If you have a local business, use LocalBusiness, not Organization. Using the wrong type confuses search engines and wastes the markup. Spend a minute matching your content to the correct schema type before you start.

A third mistake is leaving out required fields. Each schema type has certain fields that must be included for the markup to work. For LocalBusiness, you need a name and address. For Event, you need a name, date, and location. For Product, you need a name and description. Check the schema.org documentation or use Google's Schema Markup Helper to see which fields are required for your type, and fill them all in.

Finally, do not add markup just because you think it will help your rankings. Schema markup is meant to describe your content accurately. Adding it to pages where it does not belong or making up information to fill in fields will not help you rank higher — it will just confuse search engines and waste your time.

Frequently Asked Questions

Do I need schema markup to rank in search results?

No. Search engines can index and rank your pages without schema markup. Schema markup helps search engines understand your content better and can make your listing look more appealing in search results, but it is not required for ranking. Focus on good content and a working website first, then add schema markup to get more visibility.

Can I add schema markup to pages that are not yet published?

Yes. You can add schema markup to pages on your staging site or in your website builder before you publish them live. Use Google's Schema Markup Helper by pasting in the HTML code directly (instead of a URL), generate the markup, and add it to your page before you publish. Test it with the Rich Results Test before going live.

What if I use a website builder like Wix or Squarespace?

Most modern website builders have built-in schema markup or plugins that add it automatically. Check your builder's SEO settings or app store to see if there is a schema plugin available. If not, some builders let you add custom code to your pages — you can paste schema markup there. Contact your builder's support if you are not sure where to add custom code.

Will schema markup help my website show up in Google Maps?

LocalBusiness schema markup helps, but it is not the only thing Google Maps uses. You also need a Google Business Profile (a free listing you create on Google directly). Schema markup on your website reinforces the information in your Google Business Profile, but the profile itself is what gets you into Maps. Create a Google Business Profile first, then add LocalBusiness schema markup to your website to strengthen your presence.

Can I add schema markup to old blog posts?

Yes. You can go back and add Article schema markup to any blog post, even old ones. After you add it, request indexing in Google Search Console so Google re-crawls the page. Old content with schema markup can start showing up in search results with richer formatting, though search engines prioritize newer content by default.