Search code examples
htmlrelrdfagoogle-rich-snippets

Rich Snippets: rel="nofollow" and RDFa


I'm using Rich Snippets to markup my content according to the collections on schema.org. I am using RDFa Lite to do so and am now having a problem with the rel attribute. Some of my links do have the rel="nofollow" attribute/value. As RDFa Lite is a subset of RDFa, the rel attribute gets recognised as additional markup. Please see this upload to Google's Structured Data Testing Tool for the extracted data for the following markup:

<div vocab="http://schema.org/" typeof="SportsTeam">
  <span property="name">San Francisco 49ers</span>
  <div property="member" typeof="OrganizationRole">
    <div property="member" typeof="http://schema.org/Person">
      <span property="name">Joe Montana</span>
    </div>
    <span property="startDate">1979</span>
    <span property="endDate">1992</span>
    <span property="namedPosition">Quarterback</span>
   <a rel="nofollow" href="http://www.google.com/">A Paid Link</a>
</div>

The problem is of course, that the Paid Link shouldn't appear in the structured markup. Any ideas how to solve this?


Solution

  • One possibility is to use prefixes for your Schema.org usage. Because the RDFa Core Initial Context defines schema for http://schema.org/, you can even use it without specifying it in a prefix attribute first:

    <div typeof="schema:SportsTeam">
      <span property="schema:name">San Francisco 49ers</span>
      <div property="schema:member" typeof="schema:OrganizationRole">
        <div property="schema:member" typeof="schema:Person">
          <span property="schema:name">Joe Montana</span>
        </div>
        <span property="schema:startDate">1979</span>
        <span property="schema:endDate">1992</span>
        <span property="schema:namedPosition">Quarterback</span>
       <a rel="nofollow" href="http://www.google.com/">A Paid Link</a>
    </div>