I decided to take out the date info out of my permalinks as I wanted cleaner links across my blog. So yesterday, I made the switch in the WordPress configuration and removed the year, month and day numbers out of the permalink. As soon as I made the change, I realized that none of the pages that are indexed in search engines, or linked to from other blogs were working.

Old Link:
http://www.hatethegrind.com/2007/05/31/how-to-change-your-permalinks-properly/

New Link:
http://www.hatethegrind.com/how-to-change-your-permalinks-properly/

To address this issue, and to redirect users using a 301 redirect that are going to the old links, I setup the following line in my .htaccess file:

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

What that did was check to see if someone was going to the old style URL which had 3 sets of numbers in the URL (year/month/day) and if so, redirect to the new URL using the fourth parameter which was the post name. So now, I’ve made the switch to the new permalink format, and the change is seamless. The search engines will reindex my new URL (because I used a 301 redirect) and my rankings should not change and all the links that are out there from other blogs (thanks guys!) will still work. Cool stuff!

If you run a large blog and make a similar change to your permalink structure, don’t overlook this quick simple fix!

Did you like this post? If so share with others: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Netscape
  • Reddit
  • del.icio.us
  • StumbleUpon
  • Digg


Other posts you may be interested in:

  • Google SERPs Updated With My New Permalinks
  • Text Link Ads Changing Affiliate Links
  • www/non-www canonization
  • Google Plans AdWords Algorithm Change
  • Its Daylight Saving Time Again!