Just a quick test to see if WordPress by defaults redirects slug changes using a 301 or 302 redirect. The original url for this post is:
https://smackdown.blogsblogsblogs.com/2010/03/18/test-of-wordpress-default-slug-redirect-301-or-302/
and I am going to change it to:
https://smackdown.blogsblogsblogs.com/2010/03/18/wordpress-redirect-302-or-302/
Results: Using the Bad Neighborhood Header Detector we can see that WordPress does in fact use a 301 redirect redirect by default when changing a url slug (at least, WordPress 2.9.2 does, since I upgraded just before this test):
Nice one! At least now we know. Thanks 🙂
Does wordpress 2.92 also automatically do 301 redirects if you change the permalink default settings for the whole site?
Paul, I am not sure. I am personally not willing to change the permalink structure on this blog to test that, but it shouldn’t be too hard to set up a test blog and try it to see.
I totally understand Michael. I might give it a try to see for my self by creating a test blog. Will post the results back here once I do, ok
Ok, I did the test. No Luck :-(. I get a 404 error instead. I am now about to try this permalink_redirect plugin to see if that works.
Ouch, that did not work either :-(. You would think there is a workable plug-in out there that is compatible with 2.92. The ones I have found so far only seem to do this manually with one post at a time. I can’t seem to find one that automatically redirects all old permalinks to new ones.
Thanks for sharing this information. Now we know it won’t work 🙂
Glad to see the redirects are 301s. Found a great plugin a while ago to use for managing internal redirects, just wish I could remember what it was!
Hi, I don’t understand. In WP 3 I am trying to test this by changing a post slug to something new and then using http://seoredirect.com/ to see the header response but I can’t get 301 redirect, instead I see a 200 OK results. Seems like wordpress is doing an internal redirect differently or so… I am also testing with Redirection plugin in WP, but no luck yet. Hmm still confused.
Julian, if you are using a caching plugin it might be overriding the 301 redirect and serving a 200 instead, I have seen this before in the past.
I just tried this on WordPress 3.x – and it works. I was wondering why, by default, WordPress would redirect my posts when I changed slugs, and after reading this I know why, so thank you!
Is there any way to disable that per post? As I have a URL I don’t want redirected.
Thanks,
Kyleey – not that I am aware of, no. There might be a plugin that would allow you to override this behavior, but my guess is that it is not something that there is a large demand for so you might have trouble finding something that will do that.