Test of WordPress’s Default Slug Redirect: 301 or 302?

Posted on March 18th, 2010 at 10:06 am by Michael VanDeMar under blogthropology, coding, nerdiness, SEO, Wordpress

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:

http://smackdown.blogsblogsblogs.com/2010/03/18/test-of-wordpress-default-slug-redirect-301-or-302/

and I am going to change it to:

http://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):

 

Wordpress 301 slug redirect

 

Enjoyed what you read here? Subscribe to my feed.

  You should follow me on Twitter!


12 Responses to “Test of WordPress’s Default Slug Redirect: 301 or 302?”

  1. Andrew@BloggingGuide Says:

    Nice one! At least now we know. Thanks :)

  2. Paul Says:

    Does wordpress 2.92 also automatically do 301 redirects if you change the permalink default settings for the whole site?

  3. Michael VanDeMar Says:

    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.

  4. Paul Says:

    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

  5. Paul Says:

    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.

  6. Paul Says:

    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.

  7. Jamie Barclay Says:

    Thanks for sharing this information. Now we know it won’t work :)

  8. Mystery Shopping Says:

    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!

  9. Julian Says:

    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.

  10. Michael VanDeMar Says:

    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.

  11. Kyleey Says:

    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,

  12. Michael VanDeMar Says:

    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.

Leave a Reply