Search code examples
xhtmlsocial-networkingfriendseoxfn

XFN: should I use 'a' or 'link' element?


Edit: somewhat rewritten for clarification

How do social search engines interpret a link element (in the head) compared to an a element (in the body), when the link is related to XHTML Friends Network relation?

In particular, Google social graph demo

  • doesn't mention the <link rel="me"> element, and apparently these links are not followed by google bot.
  • On the contrary, Google bot successfully follows <a rel="me"> links in the body.

However, I'd like to connect a author homepage with their Google+ profile, and I don't see the point of creating anchors in the body, hence visible to everybody (except if a CSS hack is applied).

question: Is it a bug from Google bot/Google+/Social graph demo ; or is there a difference in a and link in term of XFN (XHTML Friends Network)?


Solution

  • Link elements point to resources primarily used for presentation purposes on the current application whereas anchor elements point to other applications altogether.

    Search engines can and will attempt to interpret certain link element resources including though not necessarily exclusive to RSS feeds.

    Google will see links and still follow them regardless of whether you tell it to or not (and even request paths that have been intentionally excluded by robots.txt).

    What you can do is use rel="nofollow" to tell search engines that your application does not endorse the application in the anchor effectively negating the "vote" for that application.

    <a href="http://www.example.com/" rel="nofollow">external application</a>
    

    The primary purpose of nofollow is to negate spam especially forum spam. All anchor elements generated by users typically use nofollow negating search engine manipulation and essentially only being effective at catching people who have to be unwitting people who do not know the difference between legitimate content and spam.

    Wiki has some more information about nofollow here... http://en.wikipedia.org/wiki/Nofollow

    You should reserve your use of link elements for style sheets, RSS feeds, favicons and OpenSearch only.


    As per your clarification you need to use the meta robots element. There are three options...

    archive / noarchive - Tells search engines whether it can give access to cached versions of the page through the search engine directly (e.g. Google's cache links). It's highly recommended to use noarchive to prevent content scrappers from simply bypassing your security and stealing content from you through Google instead.

    index / noindex - Tells search engines whether it may index this page or not. This can not prevent the search engine from looking at it however should there be content you don't want it to see.

    follow / nofollow - Tells search engines whether you approve following all or none of the links on the page overriding every individual anchor and link element's settings.

    Example, do no cache the page, do index and do follow links...

    <meta name="robots" content="noarchive, index, follow" />