TC
code7 min read

Structured Data and SEO: Helping Search Engines Understand Your Site

Have you ever noticed that some Google results show star ratings, FAQ dropdowns, or recipe cook times directly in the search listing? That's not magic — it's structured data. By adding machine-readable annotations to your pages, you tell search engines exactly what your content means, not just what it says.


What structured data is

HTML gives content structure for humans — headings, paragraphs, lists. Structured data adds a parallel layer of meaning for machines. It uses the Schema.org vocabulary, a shared dictionary maintained by Google, Microsoft, Yahoo, and Yandex. When you mark up a page with Schema.org types, search engines can parse facts like “this page describes a Product with a price of $29.99 and a rating of 4.5” instead of guessing from the raw text.

Why JSON-LD

There are three ways to add structured data: Microdata (inline HTML attributes), RDFa (another inline format), and JSON-LD (a script block). Google explicitly recommends JSON-LD because it separates the markup from the HTML — you can add it without touching your templates. It's just a <script type="application/ld+json"> tag in the head.


Common schema types

TypeRich resultKey properties
ArticleHeadline, image, dateheadline, author, datePublished
ProductPrice, rating, availabilityname, offers, aggregateRating
FAQPageExpandable Q&AmainEntity, acceptedAnswer
EventDate, location, ticket linkstartDate, location, offers
RecipeCook time, calories, ratingcookTime, nutrition, recipeIngredient
LocalBusinessAddress, hours, reviewsaddress, openingHours, geo

JSON-LD example: FAQ schema

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "What is structured data?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Machine-readable annotations that help search engines understand page content."
      }
    },
    {
      "@type": "Question",
      "name": "Does structured data improve rankings?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Not directly, but rich results can significantly increase click-through rates."
      }
    }
  ]
}
</script>
Rich results are earned, not guaranteed. Adding structured data makes you eligible for enhanced search listings, but Google decides whether to display them based on content quality and relevance.

Meta tags: the basics of SEO

Before structured data, meta tags were the only way to communicate with search engines. They still matter:

  • Title tag — the clickable headline in search results (50–60 characters ideal)
  • Meta description — the summary snippet below the title (150–160 characters)
  • Open Graph tags — control how your page appears when shared on Facebook, LinkedIn, and messaging apps (og:title, og:image)
  • Twitter Cards — similar to OG tags but specific to Twitter/X (twitter:card, twitter:image)

Robots.txt: what it controls

The robots.txt file sits at your site root and tells crawlers which paths they may or may not access. A common misconception: robots.txt is not a security mechanism. It's a polite request — well-behaved crawlers honour it, but malicious bots ignore it entirely. If you need to block access to a page, use authentication or server-side access control, not robots.txt.

# Allow everything except admin pages
User-agent: *
Allow: /
Disallow: /admin/
Disallow: /api/

# Point to your sitemap
Sitemap: https://example.com/sitemap.xml

Common mistakes

  • Blocking CSS/JS files — prevents Google from rendering your page properly
  • Using robots.txt to hide sensitive pages — the URLs are still visible in the file itself
  • Forgetting the sitemap directive — the easiest way to help crawlers discover your pages
Structured data, meta tags, and robots.txt form a communication layer between your site and search engines. Get all three right, and you control how your content appears across the web.

Try it yourself

Put what you learned into practice with our Schema Markup Generator.