Even if you do have the right WordPress permalink structure, WordPress wrongly treats a path with or without a trailing backslash the same way, although some search engines, like Google, see that as duplicate content. So it’s not only that WordPress sets your blog installation to an awful default query based start, which you can fix by "Changing to a new permalink structure while maintaining the old one", it’s that even if you fix that, you still need to find a way to fix the resulting content duplication.

There are a few way to take care of that :

The WordPress Permalink Redirect plugin

The easy way in WordPress is just finding the right plugin to sort things out. Luckily, the Permalink Redirect WordPress Plugin will take care of the problem for you.

A WordPress plugin that replies a 301 permanent redirect, if requested URI is different from entry’s (or archive’s) permalink. It is used to ensure that there is only one URL associated with each blog entry.

Just download, upload to your plugin directory, and activate.

The .htaccess way (mod_rewrite)

I’m hoping this would do the trick for most installation. Just add the following code if you want all URLs to have a backslash at the end :

RewriteCond %{REQUEST_URI} ^/[^.]+[^/]$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [R=301,L]

If that doesn’t work for you, you can also try :

RewriteRule ^([^.]+[^/])$ http://yourdomain.com%{REQUEST_URI}/ [R=301,L]

and this following code if you don’t want a backslash at the end :

RewriteCond %{REQUEST_URI} ^/[^.]+[^/]$
RewriteRule ^(.*)/$ http://%{HTTP_HOST}/$1 [R=301,L]

While you’re at it – a small reminder : don’t forget to redirect your www and no-www paths to the same domain.

Tagged with:

3 Responses to WordPress SEO : Fix the WordPress default permalink duplicate behavior

  1. […] Backslash duplication: http://things.co.il/416/ (with backslash) and http://things.co.il/416 (without backslash) leads to the same URL. Choose one type of URL structure with or without backslash and redirect from the other. […]

  2. jeremy says:

    I am being indexed with and without the backslash and google webmaster tools is showing a duplicate meta tag description for the backslash and non backslash pages.
    The problem is that I already have the non backslash pages redirecting and have the plugin installed and am pulling my hair out. The 301 stuff turns off the site altogether. Any suggestions?

Leave a Reply

Your email address will not be published. Required fields are marked *

Set your Twitter account name in your settings to use the TwitterBar Section.