Sizlopedia

Translate to EnglishÜbersetzen Sie zum Deutsch/GermanOversetter til Norsk/NorwegianПереведите к русскому/RussianΜεταφράστε στα ελληνικά/GreekVertaal aan het Nederlands/Dutchترجمة الى العربية/Arabic中文翻译/Chinese Traditional中文翻译/Chinese Simplified한국어에게 번역하십시오/Korean日本語に翻訳しなさい /JapaneseTraduza ao Português/PortugueseTraduca ad Italiano/ItalianTraduisez au Français/FrenchTraduzca al Español/Spanish

Wordpress Duplicate Content Vulnerability

Wordpress

The following is a Guest Blog Post written by Lovedeep Wadhwa who is a technology analyst and gives you different blogging tips and Internet related news at his blog Freakitude. Please visit his blog for further articles on blogging and technology.

Wordpress Duplicate Content Bug

Greg Mulhauser brought into my attention a Duplicate Content Vulnerability present in Wordpress and Movable type.

If you are a Wordpress user using permalinks on your blog then you must notice that the content of your posts is accessible from infinite number of different urls. You just have to append a sequence of extra digits to the end of a post’s URL.

For Example take a look at this latest post from Matt Cutt's Blog.

The same post is also available on these urls:

http://www.mattcutts.com/blog/minty-fresh-indexing/123456/

http://www.mattcutts.com/blog/minty-fresh-indexing/45678/

When we try to access the post from these urls. Wordpress doesn't return a 301 redirect or a 404 error but simply makes the post content available on these url.

Fix The Duplicate Content Bug

If you are on a self hosted Wordpress blog, you can fix the vulnerability by placing the following rules in your htaccess file.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !.*(/page/[0-9]*/?)$
RewriteCond %{REQUEST_URI} !^/200[0-9]/?$
RewriteCond %{REQUEST_URI} !^/200[0-9]/[01][0-9]/?$
RewriteCond %{REQUEST_URI} !^/200[0-9]/[01][0-9]/[0-3][0-9]/?$
RewriteRule (.*)(/[0-9]+/?)$ $1/ [R=301,L]
</IfModule>

If someone tries to access the post from these urls will get a SEO friendly redirect to the original post.

If you are using www preference on your blog, there are some special precautions to take to avoid a double redirect.

I prefer you read this post to know more. The post also gives info about fixing this duplicate content issue for Movable Type blogs and Wordpress MU blogs.

Comments on this Post

Trackbacks/Pingbacks

  1. Wordpress 2.3 Released » Freakitude
  2. Is your blog duplicate content proof? | Blogging Tips

Leave a Reply