• eXpletive Archive

    (@expletivearchive)


    Hi, I changed some permalinks on a site recently and when I visit the old URLs in my browser I am redirected to the new ones, but when I check the status code for the old URLs using any redirect or header checker service they all say that the old permalink URLs return a 200 status code instead of a 301.

    How do I make WordPress use 301 redirects for all outdated permalink URLs?

Viewing 4 replies - 1 through 4 (of 4 total)
  • ultrablogger

    (@ultrablogger)

    This is not really a problem with WordPress, it’s a problem with the with the web server. Try contacting your web host.

    Thread Starter eXpletive Archive

    (@expletivearchive)

    Thanks for the feedback @ultrablogger.

    I can’t think of anything the web host would change since there is nothing blocking sites they host from adding their own 301 redirects via .htaccess. I am using a Linux VPS.

    I just checked the www and http URLs and they both redirect via 301 to the non-www https URL.

    This issue appears to be specific to WordPress permalink changes, so I think the answer must exist within WordPress somewhere.

    @expletivearchive
    Could you sligthly more information?
    What did you change? Perhaps we aren’t even talking about specific redirection, but rather WordPress searching for best matches?

    If your number of changed pages/posts isn’t too high, perhaps you’d be better off creating specific 301 redirection directly in .htaccess? You’d get the redirection you want, and it will be fast, since PHP doesn’t need to be loaded for this. Downside is of course that .htaccess is parsed for every single http-request to your server, so if we’re talking about several hundreds of lines, then that might not be optimal.

    Thread Starter eXpletive Archive

    (@expletivearchive)

    I appended “-1” to series of permalinks in WordPress. When I try to visit to old URL I am served with the new one. At first I thought this was due to a 301 redirect because the functionality for the end user is the same, but when I checked the header for the old URL it came back as a 200 and not a 301.

    The human user experience is the same as a 301 but the bot user experience is not the same. I want a 301 for bots.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Why Do Old Permalinks Return a 200 Status Code?’ is closed to new replies.