How to nest FAQPage schema to Article or WebPage schema Type

Establishing a relationship between the FAQ content and the webpage it sits on with structured data markup is an effective way to optimise your page-level semantic knowledge graph.

By doing so, you can:

  • declare who the author of the FAQ content are
  • use the ‘mentions’ item property to describe the concepts and entities the FAQ content covers, and
  • declare who reviewed the FAQ content.

This guide will show you how to:

  • merge two JSON-LD schema markup together (specifically, FAQPage to WebPage or Article)
  • create a relationship using the schema.org item property ‘isPartOf’ between FAQPage and WebPage
  • nest FAQPage JSON-LD within WebPage schema (you can substitute with a CollectionPage or product page)

But if you’ve tried copying and pasting two separate pieces of JSON-LD together and found yourself stuck in syntax error hell, don’t worry, I’ve been there and I’m going to walk you through the exact steps of how to do do it correctly so that you will pass both schema.or validator tool and Google rich results test.

First, you will need:

  1. JSON-LD for FAQPage (click here to see an example)
  2. JSON-LD for the webpage, blog post, or article (click here to see an example)

Once you have these two pieces of individual JSON-LD scripts, you’re ready to merge them together.

Or, you can simply use my templates available on Gumroad ($29) and save yourself a lot of time and headache.

How to merge FAQPage JSON-LD within Article JSON-LD without syntax error in 7 steps

  1. Scroll all the way to the bottom of the Article/WebPage/BlogPosting JSON-LD.
  2. Find the closing square bracket wrapping the “mainEntity” component of the FAQs.
  1. Place your cursor to the right of the closing square bracket.
  2. Add a comma (“,”) then press enter/return to create a new line.
  1. In the new line, copy and paste the following JSON-LD:
  "isPartOf":{
    // Copy and paste your Article, BlogPosting or WebPage schema markup here //
  }
  1. Now go back to the Article JSON-LD but instead of copying the entire contents of the file, you’re going to find the first “@type” (it’ll be Article, WebPage, or BlogPosting), copy from that line all the way until the second last closing curly bracket.
  1. Select “// Copy and paste your Article, BlogPosting or WebPage schema markup here //” and paste over it with the text you copied in the step 6.

And you’re done!

The key to combining two sets of JSON-LD schema without getting a syntax error is to make sure you copy up until the second last closing curly bracket.

This realization took me many hours to figure out and now you can start merging different JSON-LD together and adding additional item properties to make your page-level knowledge graph incredibly rich for search engines.

Using the Commbank article as an example, this is what the final JSON-LD output looks like. For your convenience, I’ve highlighted the two different schema.org Types as well as the connecting “isPartOf” item property.

<script type="application/ld+json">
{
    "@context": "https://schema.org",
    "@type": "FAQPage",
    "author":{
        "@type":"Organization",
        "name":"Commbank Editorial Team"
    },
    "reviewedBy":{
        "@type":"Organization",
        "name":"Commbank in-house counsel"
    },
    "mainEntity": [{
      "@type": "Question",
      "name": "How does offset work?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Interest is calculated on your home loan balance minus the balance kept in your offset. So if, for example, you have a loan balance of $300,000 and $50,000 in your offset account, you’ll only pay interest on $250,000 of the loan balance. The higher the balance is in your offset, the more you’ll save on your home loan because interest will be calculated on a lower overall loan balance.",
        "mentions":[
            {
                "@type":"Thing",
                "name":"offset account",
                "sameAs":"https://www.commbank.com.au/articles/home-loans/what-is-an-offset-account.html"
            },
            {
                "@type":"Thing",
                "name":"interest",
                "@id":"http://www.wikidata.org/entity/Q170924"
            },
            {
                "@type":"Thing",
                "name":"mortgage loan",
                "@id":"http://www.wikidata.org/entity/Q1210094"
            }
            ]
      }
    },{
      "@type": "Question",
      "name": "How can you use offset?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "If your bank allows you to open multiple offset accounts, you may choose to allocate one account towards your bills and committed expenses, another towards your everyday spending, and so on. Some banks charge fees for offset accounts or have limits on how many you can open, so always check the terms and conditions before opening one.",
        "mentions":[
            {
                "@type":"Thing",
                "name":"offset account",
                "sameAs":"https://www.commbank.com.au/articles/home-loans/what-is-an-offset-account.html"
            }
            ]
      }
    },{
      "@type": "Question",
      "name": "How does a redraw facility work?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A redraw facility is different to an offset account but can also help you save on your home loan. If you make additional repayments on your home loan above the minimum required, a redraw facility allows you to access the additional repayments you’ve made over and above the required minimum repayment amount later. However, the amounts available in redraw will reduce so that by the end of your agreed loan term, both your loan balance and the available redraw will be zero. For CommBank home loans, adjustments to your available redraw will occur on your monthly repayment date.",
        "mentions":[
            {
                "@type":"Thing",
                "name":"home loan redraw",
                "sameAs":"https://www.commbank.com.au/home-loans/redraw.html"
            }
            ]
      }
    },{
      "@type": "Question",
      "name": "Is offset or redraw better?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Because an offset account works like a regular transaction account, you can use your debit card to make payments and transfer money in and out of it. A redraw facility isn’t an account but a feature attached to your eligible home loan. While it does let you access additional repayments you’ve made on your home loan after adjustments, it doesn’t offer the same flexibility as an offset account.",
        "mentions":[
            {
                "@type":"Thing",
                "name":"offset account",
                "sameAs":"https://www.commbank.com.au/articles/home-loans/what-is-an-offset-account.html"
            },
            {
                "@type":"Thing",
                "name":"home loan redraw",
                "sameAs":"https://www.commbank.com.au/home-loans/redraw.html"
            },
            {
                "@type":"Thing",
                "name":"mortgage loan",
                "@id":"http://www.wikidata.org/entity/Q1210094"
            }
            ]
      }
    }],
    "isPartOf":{
        "@type":"Article",
        "url":"https://www.commbank.com.au/articles/home-loans/offset-account-vs-redraw-facility.html", 
        "@id":"https://www.commbank.com.au/articles/home-loans/offset-account-vs-redraw-facility.html#article",
        "name":"Offset accounts vs redraw facilities explained",
        "headline":"Redraw vs offset explained",
        "slogan":"Offset accounts and redraw facilities can both help you save on your home loan in different ways.",
        "spatialCoverage":{
        "@type":"Country",
        "name":"AU"
        },
        "about":{
            "@type":"Thing",
            "name":"home mortgage",
            "sameAs":"https://www.investopedia.com/terms/h/home-mortgage.asp"
        },
        "mentions":[
        {
            "@type":"Thing",
            "name":"offset account",
            "sameAs":"https://www.commbank.com.au/articles/home-loans/what-is-an-offset-account.html"
        },
        {
            "@type":"Thing",
            "name":"home loan redraw",
            "sameAs":"https://www.commbank.com.au/home-loans/redraw.html"
        }
        ],
        "articleBody":"An offset account allows you to reduce the interest charged on your standard variable rate or investment home loan while also giving you access to your money whenever you need it. It works like a transaction account in that you can put money in and take money out any time, but it’s linked to your home loan. The money you keep in an offset account can help reduce the overall interest you pay on your loan.",
        "publisher":{
            "@type":"Organization",
            "name":"Commonwealth Bank of Australia",
            "sameAs":["https://www.facebook.com/commonwealthbank","https://www.linkedin.com/company/commonwealthbank","https://www.wikidata.org/wiki/Q285328"],
            "identifier":{
                "@type":"PropertyValue",
                "propertyID":"Australian Business Number",
                "value":"48123123124",
                "sameAs":"https://abr.business.gov.au/ABN/View/48123123124"
            }
        }
    }
  }
</script>

And this is the knowledge graph that’s created with the above JSON-LD.

How amazing does the connected entities look?

If you don’t want to do all of this by hand, you’re in luck. I have created a set of editable JSON-LD templates for this exact purpose. That is, the ability to describe any informational content in full detail with a full rich array of schema.org item properties.

All you will need to do is follow the prompts provided.

>> Get it for yourself on Gumroad

Demonstration: How to generate FAQPage markup for your FAQ content

To begin, you will need to first mark up your FAQs.

You can do this manually but there are generators such as the one you’ll find on technicalseo.com/tools/schema-markup-generator that will save you a lot of time.

For the purpose of this guide I am going to use the following informational article title ‘Redraw vs offset explained’ found on the CommBank website.

I’ve chosen this article because I’ve decided to make the majority of the body content as the FAQPage content.

This isn’t the first time I’ve done this (i.e., marking up an entire article as FAQPage) but this Commbank content has question-based headings that matches search intent. Therefore, it made sense to turn wrap all the content that is question and answer based within FAQPage markup.

I like to add a few additional properties to the FAQPage JSON-LD, specifically, calling out:

  • entities/concepts mentioned in the answers of the FAQ
  • the author (if applicable)
  • any reviewers of the content (if applicable)

Here is the JSON-LD for the FAQs:

<script type="application/ld+json">
{
    "@context": "https://schema.org",
    "@type": "FAQPage",
    "author":{
        "@type":"Organization",
        "name":"Commbank Editorial Team"
    },
    "reviewedBy":{
        "@type":"Organization",
        "name":"Commbank in-house counsel"
    },
    "mainEntity": [{
      "@type": "Question",
      "name": "How does offset work?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Interest is calculated on your home loan balance minus the balance kept in your offset. So if, for example, you have a loan balance of $300,000 and $50,000 in your offset account, you’ll only pay interest on $250,000 of the loan balance. The higher the balance is in your offset, the more you’ll save on your home loan because interest will be calculated on a lower overall loan balance.",
        "mentions":[
            {
                "@type":"Thing",
                "name":"offset account",
                "sameAs":"https://www.commbank.com.au/articles/home-loans/what-is-an-offset-account.html"
            },
            {
                "@type":"Thing",
                "name":"interest",
                "@id":"http://www.wikidata.org/entity/Q170924"
            },
            {
                "@type":"Thing",
                "name":"mortgage loan",
                "@id":"http://www.wikidata.org/entity/Q1210094"
            }
            ]
      }
    },{
      "@type": "Question",
      "name": "How can you use offset?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "If your bank allows you to open multiple offset accounts, you may choose to allocate one account towards your bills and committed expenses, another towards your everyday spending, and so on. Some banks charge fees for offset accounts or have limits on how many you can open, so always check the terms and conditions before opening one.",
        "mentions":[
            {
                "@type":"Thing",
                "name":"offset account",
                "sameAs":"https://www.commbank.com.au/articles/home-loans/what-is-an-offset-account.html"
            }
            ]
      }
    },{
      "@type": "Question",
      "name": "How does a redraw facility work?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A redraw facility is different to an offset account but can also help you save on your home loan. If you make additional repayments on your home loan above the minimum required, a redraw facility allows you to access the additional repayments you’ve made over and above the required minimum repayment amount later. However, the amounts available in redraw will reduce so that by the end of your agreed loan term, both your loan balance and the available redraw will be zero. For CommBank home loans, adjustments to your available redraw will occur on your monthly repayment date.",
        "mentions":[
            {
                "@type":"Thing",
                "name":"home loan redraw",
                "sameAs":"https://www.commbank.com.au/home-loans/redraw.html"
            }
            ]
      }
    },{
      "@type": "Question",
      "name": "Is offset or redraw better?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Because an offset account works like a regular transaction account, you can use your debit card to make payments and transfer money in and out of it. A redraw facility isn’t an account but a feature attached to your eligible home loan. While it does let you access additional repayments you’ve made on your home loan after adjustments, it doesn’t offer the same flexibility as an offset account.",
        "mentions":[
            {
                "@type":"Thing",
                "name":"offset account",
                "sameAs":"https://www.commbank.com.au/articles/home-loans/what-is-an-offset-account.html"
            },
            {
                "@type":"Thing",
                "name":"home loan redraw",
                "sameAs":"https://www.commbank.com.au/home-loans/redraw.html"
            },
            {
                "@type":"Thing",
                "name":"mortgage loan",
                "@id":"http://www.wikidata.org/entity/Q1210094"
            }
            ]
      }
    }]
  }
</script>

If your main goal is to have FAQPage rich results show on the SERPs, please note that Google will show the first 2 questions and answers you mark up and will ignore all the rest. Therefore, you can save time by marking up the first 2 FAQs. But in doing so, you’re potentially excluding important bits of the page’s knowledge graph.

If, however, your main goal is to describe the content of your body text using structured data, mark up every question and answer.

Once you have your FAQs marked up in JSON-LD (including hyperlinks), copy and paste the JSON-LD into Visual Studio Code (as shown below).

Demonstration: How to mark up your webpage, blog post or article using JSON-LD

This is how I’ve marked up ‘Offset account vs redraw facilities explained’ using JSON-LD:

{
    "@context":"https://schema.org",
    "@type":"Article",
    "url":"https://www.commbank.com.au/articles/home-loans/offset-account-vs-redraw-facility.html", 
    "@id":"https://www.commbank.com.au/articles/home-loans/offset-account-vs-redraw-facility.html#article",
    "name":"Offset accounts vs redraw facilities explained",
    "headline":"Redraw vs offset explained",
    "slogan":"Offset accounts and redraw facilities can both help you save on your home loan in different ways.",
    "spatialCoverage":{
        "@type":"Country",
        "name":"AU"
    },
    "about":{
        "@type":"Thing",
        "name":"home mortgage",
        "sameAs":"https://www.investopedia.com/terms/h/home-mortgage.asp"
    },
    "mentions":[
        {
            "@type":"Thing",
            "name":"offset account",
            "sameAs":"https://www.commbank.com.au/articles/home-loans/what-is-an-offset-account.html"
        },
        {
            "@type":"Thing",
            "name":"home loan redraw",
            "sameAs":"https://www.commbank.com.au/home-loans/redraw.html"
        }
    ],
    "articleBody":"An offset account allows you to reduce the interest charged on your standard variable rate or investment home loan while also giving you access to your money whenever you need it. It works like a transaction account in that you can put money in and take money out any time, but it’s linked to your home loan. The money you keep in an offset account can help reduce the overall interest you pay on your loan.",
    "publisher":{
        "@type":"Organization",
        "name":"Commonwealth Bank of Australia",
        "sameAs":["https://www.facebook.com/commonwealthbank","https://www.linkedin.com/company/commonwealthbank","https://www.wikidata.org/wiki/Q285328"],
        "identifier":{
            "@type":"PropertyValue",
            "propertyID":"Australian Business Number",
            "value":"48 123 123 124",
            "sameAs":"https://abr.business.gov.au/ABN/View/48123123124"
        }
    }
}

When you copy and paste the above JSON-LD into Schema.org’s validator tool you will see the “slogan” item property throws an error.

This is fine.

And this is the knowledge graph the JSON-LD looks like.

Similar Posts