Removing date from WordPress permalink: .htaccess 301

I just updated my permalinks structure on amdsoft.com to remove the dates from the URL. This is slightly better for SEO, and is nicer looking also.

So now we get URLs like

http://amdsoft.com/essential-software-for-new-macos-box/

instead of

http://amdsoft.com/2009/03/12/essential-software-for-new-macos-box/

In WordPress, this is changed at www.yourdomain.com/wordpress/wp-admin/options-permalink.php, select Custom Structure and just use

/%postname%/

Here’s the 301 redirect (replace amdsoft with your domain):

RedirectMatch 301 /([0-9]+)/([0-9]+)/([0-9]+)/(.*)$ http://amdsoft.com/$4

Make sure it appears all on one line in your .htaccess file, and that it’s above the WP code in there.

Thanks to Aaron over at SEO book for this htaccess code. Edit: someone just pointed out to me that this is originally from Yoast tweaking websites blog- so thanks Joost (and also to Aaron for bringing it to my attention)! I highly recommend reading both of these guys, they’re both awesome.

This entry was posted in geek, seo and tagged , , , , . Bookmark the permalink.

One Response to Removing date from WordPress permalink: .htaccess 301

  1. Pennyroll says:

    I’m about to under go this change this afternoon But I’m concerned that I will loose some traffic during the url change.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>