What is an XFN link relationship in WordPress?

XFN link relationship

What is a link relationship (XFN) in WordPress?

Link relationship (XFN) stands for XHTML Friends Network. Global Multimedia Protocols Group made and maintains the XFN standards. XFN uses hyperlinks to represent real-world human relationships.

In other words, you can think of XFN as distributed social networking. Unlike traditional social networks, there is no central server where everything is stored. It’s up to the creator of the website to put XFN relationships information into hyperlinks.

If the creator of the website did embed XFN information, then people and search engines can read that information and make more meaningful relationships between websites and people. Including XFN links on your website might help with SEO.

Content:

Getting started with link relationship (XFN)

For example, let’s say that you have a friend named John. John has a blog where he talks about smartphones. Also, you have a blog or website and you want to link to John’s blog. In short, you would do this by adding this line of code to your site:

<a href="http://john-blogs.com/">John's blog</a>

then people that view your site can also go to John’s blog. You can take one extra step and add a relationship to the hyperlink. To do this add to hyperlink code rel=”friend”. The code should look like this:

<a href="http://john-blogs.com/" rel="friend">John's blog</a>

You can use more than one relationship value in the link. If you are using more than one value they should be separated by spaces. For example, let’s say that you also met John in real life. In this case, you can add a ‘met’ to your link. The link should look like this:

<a href="http://john-blogs.com/" rel="friend met">John's blog</a>

This way people and search engines know that John is your friend and that you met him in real life.

List of XFN values that you can use

There are more relationships that you can use besides a friend and met. For this reason, we present you with a full list of XFN link relationships values that you can use.

Friendship

There are three values that you can pick from. You can only use one. The values are:

  1. contact – Someone that you met and can get in contact with.
  2. acquaintance – Someone that you met a few times but you are not close enough with that person to call them a friend.
  3. friend – Someone you consider to be your friend.

Professional relationship

  1. co-worker – Someone that you work with within the same company or organization.
  2. colleague – Someone that works in the same field as you.

Family – link relationship (XFN)

When using values from this category, you can only pick one value.

  1. child – Your child does not matter if you are a biological parent or not.
  2. parent – One of your parents. It does not matter if you were adopted.
  3. sibling – Someone that you share a parent with.
  4. spouse – Someone that you are married to.
  5. kin – Person that is considered part of the family.

Romantic

Same as in family you can only pick one link relationship (XFN) value from this list.

  1. muse – Someone that brings you inspiration. This is not strictly romantic inspiration can be a professional inspiration.
  2. crush – You are attracted to this person. But you did not express your feelings to that person.
  3. date – Person that you are dating now.
  4. sweetheart – You are intimate with this person and committed to some extent.

Geographical

  1. co-resident – Someone that you share the street address with.
  2. neighbor – This person lives close to you. Maybe a few doors from you or a few streets away.

Physical

  1. met – You physically met with this person.

Identity

  1. me – In case, you are linking to your website you should add this value to the hyperlink. When using the ‘me’ value you should not include any other values.

Link Relationship (XFN) – Conclusion

In this article, we showed how to use XFN and provided a full list of values that you can use. Therefore you can start using XFN today to represent your relationships and possibly boost your SEO.

For more WordPress websites error fixes and tutorials check the rest of our blog. If you have further questions write them in the comment section below. Have a great day!

 This post was written by Mesheal Fegor

Mesheal Fegor is a Web/WordPress Developer and technical writer. His WordPress help articles have been featured on Kinsta and other sites. Mesheal holds a master's degree in computer science. His writing focuses on technical WordPress issues, ranging from core WordPress problems, to issues with WooCommerce, and more.

Last edited by: FixRunner Team