March 25, 2009

rel=“canonical” and Expression Engine SEO

Article about ▸

written by Marek Foss

Search results

If you have read my previous two articles on Search Engine Optimization (SEO) and Google-friendly links for Expression Engine (EE), then you know how important these tweaks are. They help with various things, duplicate content among them. Google recently introduced another tool to deal with that particular problem — canonical page tag. And there are a few places in Expression Engine where it works perfectly.

What is rel=“canonical”? Google introduced this tag to deal with duplicated content, caused mainly by passing additional info in the URL query string. The URL seems different to the search engine crawler, but leads to the same page. Consider this example:

http://testowy.com/test-articles.php?sort=price&show=vat
http://testowy.com/test-articles.php?sort=name

Both URLs point to the same page, but may be indexed as different due to different query string. In EE this is the often the case with pagination — if you use Google Webmaster Tools, you may notice that the diagnostics show duplicate content errors on pagination links. For example, it’s the pagination of comments of an article:

/article/the-140-character-webapp-challenge/‎
‎/article/the-140-character-webapp-challenge/P50/‎

However, it’s the same with any other pagination in EE (entries list, comments or article text). The solution is to add the rel=“canonical” tag in the template header. If you add it on the main page, to prevent indexing of entries list pagination, use your main page URL:

<link rel="canonical" href="http://f055.net"/>

You should also add it in the article template, in case you get loads of comments and due to their pagination your unique entry URL won’t be unique any more. Use the {title_permalink} EE tag:

<link rel="canonical" href="{title_permalink="article"}"/>

Change the article to the name of your entry template. If you write long articles and use paragraph pagination, this method also applies.

Using the canonical tag, you should stop Google from indexing the incorrect URLs, dealing with most of the duplicate content errors that might appear in the Webmaster Tools diagnostics.


If you liked the article, please spread the word and share it!

  • Share

Comments



Leave a comment: (comments may not appear immediately due to page caching)

Name: Email: (not disclosed)

WWW: Remember my details

Notify me of follow-up comments

Feed me:

to feed
  • Subscribe and get the new articles every now and then directly in your reader — I recommend using Google Reader

Facebook:

Connect:

 by Google
Google FriendConnect appears to be down at the moment. Sorry for inconvenience.
Related Posts with Thumbnails