I'm a dev for an AEM site and we have an FAQ Component that generates schema markup JSON with "@type": "FAQPage"
for Google. The issue is if the author adds two FAQ components to a single page there will be two schemas with the "@type": "FAQPage"
in two different script blocks on the same page. Is this allowed and best practice, or do I have to add something on the back end that will just generate one schema for all the FAQ components on a certain page?
1 Answer
Unfortunately, no, FAQPage
should only be defined once per page. This is because a single array object is expected.
Required Properties
MainEntity |
---|
Question - An array of Question elements which comprise the list of answered questions that this FAQPage is about. You must specify at least one valid Question item. A Question item includes both the question and answer. |
So if you want your pages to be eligible for rich results on Search and/or Actions on Google Assistant, you're going to have to work out a solution that generates one schema.
Some other helpful guidelines:
- The same FAQ content should not be used on multiple pages
- FAQ rich snippets on mobile typically choose the first 3
- Accordions are not a problem, and they won't be perceived as cloaking.
- You can't add schema for content that doesn't exist on the page you're adding it to.