How To Change Your Permalinks Properly
SEO, wordpress May 31st, 2007Old 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!
Other posts you may be interested in:







May 31st, 2007 at 12:55 pm
Spectacular! I’ve been wanting to do this for awhile, but I didn’t want to risk losing visitors from inbound links or even messing up cross-post links. Thank you so much for the tip!
June 4th, 2007 at 12:08 pm
[...] like Google has already updated all my indexed pages to my new permalink format. By using a 301 redirect, I was able to let the Googlebot know that I had moved the pages to [...]