2

Is there any way to retain the HTML rel part of the below snippet:

<body vocab="http://schema.org/" typeof="AboutPage">
   <address property="author" typeof="person">Contact <a rel="author" href="mailto:your-email@example.com" property="name">My Name</a></address>
</body>

without getting this warning:

AboutPage                0 ERRORS  1 WARNINGS
@type           AboutPage
author  
    @type       Person
    name        My Name
!   author      The property author is not recognized by Google for an object of type Person.
        @type   Unspecified Type

Just a rel:

<body vocab="http://schema.org/" typeof="AboutPage">
   <address>Contact <a rel="author" href="mailto:your-email@example.com" >My Name</a></address>
</body>

gives

AboutPage                0 ERRORS  0 WARNINGS
@type           AboutPage
author  
    @type       Unspecified Type

I cannot seem to give the rel a type without property="author" which then causes weird author duplicates of various types.

I'm aware that I could just remove the rel entirely or move it to meta data, but if the Structured Data Testing Tool insists on recognizing the rel="author" then there must be a way to give it a type, no?

  • Google doesn't give any special treatment for author schema anymore. You should just remove it. – Stephen Ostermiller Mar 4 at 11:24
  • And yet it is still required for each BlogPosting. Since I am building a single author blog, my plan was to have the Author marked up and visible on the WebPage but hidden in the individual posts since "written by me" and "also written by me" would get repetitive. – arghc Mar 5 at 3:26
  • I don't think there is a rich snippet for BlogPosting either. – Stephen Ostermiller Mar 5 at 3:45
  • It is not all about what currently generates a rich snippet... – arghc Mar 6 at 18:14
  • I don't know of any other benefit. It doesn't help rankings. Browsers and users ignore it – Stephen Ostermiller Mar 6 at 19:44
1

The rel attribute has two different purposes, which might conflict:

  • Plain HTML: providing a link type
  • RDFa: providing a property (just like the property attribute, but with some technical differences)

In both of your snippets, it’s interpreted¹ to be the Schema.org property author, not the link type author.

The best general way to prevent such mix-ups is not to use vocab. Use prefix instead (or rely on the RDFa Core Initial Context):

<!-- using 'prefix' -->

<body prefix="s: http://schema.org/" typeof="s:AboutPage">
  <address property="s:author" typeof="s:Person">
    Contact <a rel="author" href="mailto:your-email@example.com" property="s:name">My Name</a>
  </address>
</body>
<!-- rely on the RDFa Core Initial Context, which defines 'schema' -->

<body typeof="schema:AboutPage">
  <address property="schema:author" typeof="schema:Person">
    Contact <a rel="author" href="mailto:your-email@example.com" property="schema:name">My Name</a>
  </address>
</body>

Note that Google will now report an error:

The property http://www.w3.org/TR/html5/links.html#link-type-author is not recognized by Google for an object of type Person.

This is no problem, you can ignore it, as the generated URI shows that Google’s SDTT correctly understands that the rel value is a link type (which might also be used as RDF property), and it’s no longer interpreting it to be a Schema.org property. It also gives this error when using properties from other vocabularies than Schema.org, which is a perfectly fine and useful thing to do.


¹ Side note: If I understand list item 7 correctly, an RDFa parser should ignore the rel attribute in your specific case, because you have the property attribute on the same element, and your rel doesn’t contain a CURIE/URI value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.