Advertisement

A Short Guide to Trackbacks

by
Student iconAre you a student? Get a yearly Tuts+ subscription for $45 →

Trackbacks connect blogs together and create a network of blogs in the same way that links create a network of web pages.


Basics and Benefits

A trackback is a notification of linking to a web document. In other words this system allows peer-to-peer communication and conversations between blogs. It helps keep track of who is linking or referring to a webpage (article) and therefore brings interested readers to the given site. Trackback is one of the three linkback methods, the other two being refback and pingback. Note that for applying a trackback it is not necessary to be physically linked with each other. Pingbacks were designed to solve some of the problems that people saw with trackbacks.


Brief Practical Example

  1. Joe writes a new article on his blog and presses the publish button.
  2. Melissa wants to comment on Joe's blog, but wants her own readers to see what she had to say, and be able to comment on her own blog
  3. Melissa posts on her own blog and sends a trackback to Joe's site
  4. Joe's page receives the trackback, and displays it as a comment to the original post. This comment contains a link to Melissa's post.

History

Trackbacks have been around about as long as blogging. In 2002, the specification for trackbacks was created by Six Apart which first implemented it in Movable Type. Since then it has been implemented in other blogging tools as well. Six Apart started a working group in February 2006 focusing on improvements. Six Apart also has submitted trackback to the Internet Engineering Task Force (IETF) for approval as a standard online protocol. One well known blogging service that does not support trackback is Blogger. Instead they support backlinks.


More Details

Blogging software, like WordPress, Drupal, and Movable Type, support automatic pingbacks. Often the term pingback is used for any kind of linkback. Some other software that support trackbacks are: ExpressionEngine, Sitefinity, Typo, CodeIgniter, and Weebly.

The notification medium of this method is HTTP POST. By default the minimum information sent by the linking server for backing is the linking post URL. Further optional data can be: linking site name, linking post title, and linking post excerpt. The trackback specification describes a REST framework, within which the client makes a standard HTTP call, or ping, and receives an XML response. The ping is automatically generated in some versions of blogging software, though in others a blogger has to manually send the ping. Software that supports the protocol will display a URL at the end of each post (trackback / pingback).


Spam Pirates

Trackback has been targeted by spammers hoping to improve search engine rankings to their own sites by increasing their number of inbound links. Many versions of blogging software have added spam filters, such as CAPTCHAs, to block link abuse.


The WordPress Approach of Trackbacks

Fortunately we don't need a plugin to display the trackback information because by default WordPress comments will show the trackbacks / pingbacks in line with other comments. Our favourite content management system goes to a new level by allowing pingbacks. Pingbacks allow you to notify a weblog of your entry just by posting its permalink directly in the content of your blog entry. No special trackback link is necessary. To enable pinging URLs in the blog entry, make sure there is a check mark next to "Attempt to notify any Weblogs linked to from the article (slows down posting.)" in the "Options→Discussion" section of the WordPress admin panel.


Usage

You can react / connect with a trackback URL this way: copy that other entry's trackback URL into your post's trackback field and publish your post. You may have to turn on the trackback or pingback field to show up on the new entry view in WordPress' admin.


Manoeuvres

A successful operation usually appears in a couple of seconds after publishing your blog entry, but note that trackbacks and pingbacks can be moderated or disabled. WordPress will display all the URLs that were notified about your blog entry. Sometimes a blog may be having technical difficulties with the trackback or pingback system. If you believe that is the case, you can politely send the blog owner a message outlining the potential problem, be sure to include all necessary and relevant information for them to troubleshoot.


Figuring Out Trackback Support

Usually you can assume that most WordPress blogs support the pingback feature, however, it can be disabled or moderated. If the site has pings enabled, a link with a brief sampling of the text around it will appear on their blog. WordPress uses the file called xmlrpc.php to handle pingbacks. In short it uses XML-RPC, which is a remote procedure call (RPC) protocol which uses XML to encode its calls and HTTP as a transport mechanism. If you want to be certain pingbacks are supported, you have to look into the page source (HTML code):

<link rel="pingback" href="..." />

Positive and Negative Technicalities

It is a very good thing that the information needed for requesting (site name, title, and excerpt) are present in the notification itself. But there are some cons as well, for example:

  • notification requires positive action by linking server,
  • the technical specification is only partially designed,
  • source code validation (HTML) may be prevented during autodiscovery,
  • extremely vulnerable to spam.

Requesting

Here is an example sending a standard HTTP GET request to ping the URL.

http://foo.com/mt/mt-tb.cgi?tb_id=ID&title=TITLE&url=URL

XML Responses

Possible successful ping response:

<?xml version="1.0" encoding="iso-8859-1"?>
<response>
<error>0</error>
</response>

A failed ping response can be:

<?xml version="1.0" encoding="iso-8859-1"?>
<response>
<error>1</error>
<message>The error message</message>
</response>

The Power of Pinging: Creative Uses

Trackbacks can be used as a discussion board, but there's more to it. A very interesting thing you can do with trackbacks is to display the songs played on your mp3 playing application (eg. iTunes, WinAmp). Trackbacks are great to help promote your blog as well, be sure to use them within the same niche or category.


Official Specs

Read the official trackback technical specification at the Movable Type website, or if you prefer the pingback documentation it's also available on Ian Hickson's webpage.


Tips On Using Things Wisely

  • WordPress allows you to set your default ping status in the Options menu. If the majority of your posts will have trackbacks (or pingbacks) enabled, setting it to accept them could make your blogging life a little easier. To set it go to the admin panel, then Options → Discussion and check "Allow link notifications from other Weblogs (pingbacks and trackbacks.)".
  • If the site you're linking to has pingbacks enabled, be sure not to trackback!
  • If your trackback or pingback doesn't show up on the website, don't try to force it by continually using trackback or pingback.
  • To not be considered spam, avoid trackback sending unless you actually reference the site you're sending the trackback to.

Finally

Don't just read about trackbacks, apply it in practice! For starters: at least make a post with a trackback! Good luck!

Advertisement