Schema output for Yoast SEO

This page documents the schema.org markup output by the Yoast SEO plugin. More information about our API, integration mechanics, and methodology can be found here.

Contents

  • Base output for every page
  • Specific objects
  • Specification per page type

    Base output for every page

    Each page's output description is based on the output below. In this documentation we refer to sections of the graph as "pieces", so Organization is a "graph piece".

    {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://example.com/#organization",
                "name": "Yoast",
                "url": "https://example.com/",
                "sameAs": [
                    "https://www.facebook.com/yoast",
                    "https://www.linkedin.com/company/yoast-com/",
                    "https://en.wikipedia.org/wiki/Yoast",
                    "https://twitter.com/yoast"
                ],
                "logo": {
                    "@type": "ImageObject",
                    "@id": "https://example.com/#logo",
                    "url": "https://example.com/wp-content/uploads/2019/03/Yoast_Logo_tagline_Large_RGB.png",
                    "caption": "Yoast"
                },
                "image": {
                    "@id": "https://example.com/#logo"
                }
            },
            {
                "@type": "WebSite",
                "@id": "https://example.com/#website",
                "url": "https://example.com/",
                "name": "one.wordpress.test",
                "publisher": {
                    "@id": "https://example.com/#organization"
                },
                "potentialAction": {
                    "@type": "SearchAction",
                    "target": "https://example.com/?s={search_term_string}",
                    "query-input": "required name=search_term_string"
                }
            },
            {
                "@type": "WebPage",
                "@id": "https://example.com/#webpage",
                "url": "https://example.com/",
                "inLanguage": "en-US",
                "name": "one.wordpress.test - Just another WordPress site",
                "isPartOf": {
                    "@id": "https://example.com/#website"
                },
                "about": {
                    "@id": "https://example.com/#organization"
                },
                "description": "Just another WordPress site"
            }
        ]
    }

    Depending on whether the site represents a Person or a Company:

    The organization: Organization

    Describes the company/organization that's represented by this site.

    • @type: Organization
    • @id: <homepage_url>#organization
    • name: <site name>
    • url: <homepage_url>
    • sameAs: Array of social + WikiPedia URLs
    • logo
      • @type: imageObject
      • @id: <homepage_url>#logo
      • url: <logo image URL>
      • caption: <site name>
    • image - references logo
      • @id: <homepage_url>#logo

    Example:

    {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://example.com/#organization",
                "name": "Yoast",
                "url": "https://example.com/",
                "sameAs": [
                    "https://www.facebook.com/yoast",
                    "https://www.linkedin.com/company/yoast-com/",
                    "https://en.wikipedia.org/wiki/Yoast",
                    "https://twitter.com/yoast"
                ],
                "logo": {
                    "@type": "ImageObject",
                    "@id": "https://example.com/#logo",
                    "url": "https://example.com/wp-content/uploads/2019/03/Yoast_Logo_tagline_Large_RGB.png",
                    "caption": "Yoast"
                },
                "image": {
                    "@id": "https://example.com/#logo"
                }
            }
        ]
    }

    The person: Person

    Describes the person that's represented by this site.

    • @type: Person
    • @id: <homepage_url>#/schema/person/<user hash>
    • name: <site name>
    • description: <User bio>
    • sameAs: Array of social + WikiPedia URLs
    • image
      • @type: imageObject
      • @id: <homepage_url>#personlogo
      • url: <gravatar URL>
      • caption: <user display name>

    Example:

    {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Person",
                "@id": "https://example.com/#/schema/person/5e511f8d9327c71a80ea75d02bc11d2f",
                "name": "Joost de Valk",
                "image": {
                    "@type": "ImageObject",
                    "@id": "https://example.com/#personlogo",
                    "url": "http://0.gravatar.com/avatar/f08c3c3253bf14b5616b4db53cea6b78?s=96&d=mm&r=g",
                    "caption": "Joost de Valk"
                },
                "description": "This is Joost's bio",
                "sameAs": [
                    "https://www.facebook.com/jdevalk",
                    "https://twitter.com/jdevalk"
                ]
            }
        ]
    }

    The website: Website

    Describes the website's attributes.

    • @type: Website
    • @id: <homepage_url>#website,
    • url: <homepage_url>,
    • name: <site name>,
    • publisher - references Organization
      • @id: <homepage_url>#organization
    • potentialAction
      • @type: SearchAction
      • target: <homepage_url>?s={search_term_string}
      • query-input: required name=search_term_string

    Example:

    {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "WebSite",
                "@id": "https://example.com/#website",
                "url": "https://example.com/",
                "name": "one.wordpress.test",
                "publisher": {
                    "@id": "https://example.com/#organization"
                },
                "potentialAction": {
                    "@type": "SearchAction",
                    "target": "https://example.com/?s={search_term_string}",
                    "query-input": "required name=search_term_string"
                }
            }
        ]
    }

    The page: WebPage

    Describes the current page's attributes.

    • @type: WebPage
    • @id: <canonical>#webpage
    • url: <canonical>
    • inLanguage: <site language>
    • name: <page title>
    • description: <page description>
    • isPartOf - references WebSite @id: <homepage_url>/#website
    • image - when we have a featured image.
      • @type: ImageObject
      • @id: <canonical>#primaryimage
      • url: <image_url>
      • caption: <image caption>
    • primaryImageOfPage - references image above @id: <canonical>#primaryimage

    Example:

    {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "WebPage",
                "@id": "https://example.com/sample-page/#webpage",
                "url": "https://example.com/sample-page/",
                "inLanguage": "en-US",
                "name": "Sample Page - one.wordpress.test",
                "isPartOf": {
                    "@id": "https://example.com/#website"
                },
                "datePublished": "2019-02-20T13:36:57+00:00",
                "dateModified": "2019-02-20T13:36:57+00:00",
                "breadcrumb": {
                    "@id": "https://example.com/sample-page/#breadcrumb"
                }
            }
        ]
    }

    A list outlining the position of the current page in the page tree.

    • itemListElement
      • @type: ListItem
      • position: the position in the list.
      • item
        • @type: WebPage
        • @id: <page url>
        • url: <page url>
        • name: Page title

    Example:

    {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "BreadcrumbList",
                "@id": "https://example.com/sample-page/#breadcrumb",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "item": {
                            "@type": "WebPage",
                            "@id": "https://example.com/",
                            "url": "https://example.com/",
                            "name": "Home"
                        }
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "item": {
                            "@type": "WebPage",
                            "@id": "https://example.com/sample-page/",
                            "url": "https://example.com/sample-page/",
                            "name": "Sample Page"
                        }
                    }
                ]
            }
        ]
    }

    Specific objects

    Images

    There are multiple types of Schema pieces that can contain images, and basically, these images are always the same. We have them in two forms: "simple", where we have almost no meta-data, and the more complete when we have attachment meta-data.

    This is the simple ImageObject example:

    {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "ImageObject",
                "@id": "https://example.com/how-to-test/#primaryimage",
                "url": "https://example.com/wp-content/uploads/2019/03/example.jpg"
            }
        ]
    }

    This is the more extensive ImageObject example:

    {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "ImageObject",
                "@id": "https://example.com/how-to-test/#primaryimage",
                "url": "https://example.com/wp-content/uploads/2019/03/example.jpg",
                "width": 800,
                "height": 600,
                "caption": "Example image"
            }
        ]
    }

    Specification per page type

    Homepage

    • Add an about attribute, referencing the Person or Organization.
    • Omit BreadcrumbList, as this would be a list of just 1: the current page.

    In case frontpage is a page, not an archive, treat like a single page.

    Single page

    • WebPage, add these attributes:
      • datePublished: <publication date>
      • dateModified: <modification date>
      • breadcrumb references BreadcrumbList

    Single posts

    • WebPage:
      • @type becomes SearchResultsPage
    • Article:
      • @id: <canonical>#article
      • isPartOf - references WebPage
      • mainEntityOfPage - references WebPage
      • author - references Author
      • publisher - references the Organization or Person the website represents.
      • headline - page title (not SEO title).
      • datePublished
      • dateModified
      • commentCount
      • image references the #primaryimage if available.
      • keywords - a comma separated list of post tags.
      • sections - a comma separated list of the post's categories.
    • Author: only shows up when the website represents an Organization or the author is not the Person the website represents.
      • @type: Person
      • url: points to the author's posts archive.
      • Just like Person on Homepage.

    Taxonomy & date archives

    • WebPage
      • @type becomes CollectionPage

    Post type archives

    • WebPage
      • @type becomes CollectionPage

    Author archives

    • WebPage
      • @type becomes ProfilePage
    • Person
      • @type: Person
      • @id: <canonical>#/schema/person/<user hash>
      • mainEntityOfPage: <canonical>#webpage
      • name: <person display name>
      • description: <User bio>
      • sameAs: Array of social + WikiPedia URLs
      • image
        • @type: imageObject
        • @id: <homepage_url>#personlogo
        • url: <gravatar URL>
        • caption: <user display name>

    Search result pages

    • WebPage:
      • @type becomes SearchResultsPage

    404 or other error pages

    • Remove WebPage.