Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Add Schema Markup to Your Website

This guide shows you how to add schema markup so search engines understand your page better.

How-To Guides2 min read7 steps

What is schema markup?

Search engines such as Google read your pages, but they can guess wrong. Schema markup is a small block of extra code that says clearly what your page is about. It is like a name tag. It can say "this is a business", "this is a recipe" or "this is an article". Search engines may then show richer results, such as star ratings. This is not guaranteed.

The most common format is JSON-LD. It is a simple list of labels and values that sits inside a script tag in your page.

Steps

  1. Decide what your page is. For example, a local business, an article or a product.
  2. Find the matching type on the schema.org website. It lists every type and its fields.
  3. Write your JSON-LD. This example describes a business.
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "LocalBusiness",
      "name": "Your Business Name",
      "url": "https://www.example.com",
      "telephone": "your phone number"
    }
    </script>
    Replace each value with your real details.
  4. Paste the block into your page. Put it inside the <head> section or near the end of the <body>.
  5. Save the file and upload it. You can use the File Manager in your control panel.
  6. Test it. Search for Google's Rich Results Test, paste your page address, and read the result.
  7. Fix any errors it shows, then test again.

If you use WordPress

You do not need to edit code. Many SEO plugins, such as Yoast SEO or Rank Math, add schema for you. Open the plugin settings and look for a Schema section. Fill in your details there.

Rules to follow

  • Only mark up things that visitors can see on the page.
  • Do not invent reviews or ratings. Search engines may punish fake data.
  • Keep it correct. A missing comma breaks the whole block.
Tip: Take a backup of the page before you edit it, so you can go back if something breaks.

Quick recap

  • Schema markup tells search engines what a page is.
  • JSON-LD is the easiest format.
  • Paste it into your page, then test it.
  • WordPress plugins can do this for you.