If a question has no answer, the structured data is missing the Schema.org types QAPage and Question.

Example: question with answer

The QAPage item is specified on the html element, and the Question item is specified on the div element:

<html itemscope itemtype="http://schema.org/QAPage" class="html__responsive">
<div itemprop="mainEntity" itemscope itemtype="http://schema.org/Question">

What Google’s SDTT parses:

Example: question without answer

It has neither the QAPage type nor the Question type.

The html element (which would usually carry the QAPage type) doesn’t create any Microdata item, and the div element (which would usually carry the Question type) has no type specified (only itemscope):

<html class="html__responsive">
<div itemscope>

What Google’s SDTT parses:

As no itemtype is specified for the item (that gets created with itemscope), no vocabulary identifier is prepended to the properties (name, image, upvoteCount etc.). This means that these properties aren’t Schema.org properties (except for the name that belongs to the Person, as there the Schema.org type is specified).

That’s why the SDTT says "Unspecified Type", and that’s why it prepends the document’s base URL (https://stackoverflow.com/) to the properties.

Recommended fix

It should be fine to use QAPage and Question if no Answer is posted yet. It’s also fine for Google’s Q&A Page rich result:

The Question type defines the question that this page answers, and includes the answers, if any, to that question.

answerCount - Integer - The total number of answers to the question. For example, if there are 15 answers, but only the first 10 are marked up due to pagination, this value would be 15. This may also be 0 for questions with no answers.

For questions without answers, set the answerCount property to 0.

So, the most straightforward fix would be to use the same structured data (that gets used for a question with answer) for a question without answer. The only difference would be to omit the suggestedAnswer/acceptedAnswer properties.

(currently, answerCount: 0 is already provided for a question without answer, as the screenshot above shows)

Alternative fix

If, for some reason, QAPage shouldn’t be used, you could

  • either use its parent type WebPage instead of QAPage (and everything else stays the same):

    <html itemscope itemtype="http://schema.org/WebPage" class="html__responsive">
    <div itemprop="mainEntity" itemscope itemtype="http://schema.org/Question">
  • or omit the page type, and just use Question (without mainEntity):

    <html class="html__responsive">
    <div itemscope itemtype="http://schema.org/Question">
  • 1
  • @VoteDukakis: Indeed, thank you! -- Currently, the SDTT doesn’t report any error for a QAPage with a Question without Answer. Not sure, though, if this was the case back in January, too (and Google reported the errors via the Search Console only), or if the SDTT got changed in the meantime. – unor May 16 at 15:23

You must log in to answer this question.

Browse other questions tagged .