Looking for Automatic 301 Plugin for WordPress

by 7 replies
9
Has anyone seen or used an automatic 301 Plugin (redirect) for WordPress?

I've found several plugins, but they require you to define the missing page and set up a redirect.

What I want is this - if someone goes to a non-existing page, instead of getting a 404 error (and a 404 in the header sent back to the browser) I instead want it to send a 301 to a specific page (if that 404 page was configured and mapped) OR send to the home page with a 301 if that specific page was not mapped.

The idea is that there will never be a 404 error on the site and if there is a missing page we treat it as a 301 to the home page.

Has anyone seen this?

Thanks!
#search engine optimization #301 #automatic #plugin #wordpress
  • Put the redirect at the top of your 404.php file in your theme.

    <?
    Header( "HTTP/1.1 301 Moved Permanently" );
    Header( "Location: http://www.new-url.com" );
    ?>
    • [ 1 ] Thanks
    • [2] replies
    • There is a wordpress plugin called link juice keeper that does exactly what you want.
      • [ 1 ] Thanks
    • Dose this code works automatically for all 404 or I need to set each URL settings?
      • [1] reply
  • Banned
    I do what DeskCoder does above with some of my sites 404.php pages.

    Here is the Wordpress 404/301 redirect code I use.


    This will redirect 100% of all broken links back to the Wordpress blogs Index page.

    The code above is the only code inside my 404.php file.

    [edit]
    The forum keeps breaking my php code, that's the reason for the code/screenshot.
    • [ 1 ] Thanks
    • [1] reply
    • Thanks for the tips. I will test these methods. I want to be sure the browser (i.e., Google) receives a true 301 and not a 404 code with a redirect attached.

      Thanks again!
  • I didn't think about the status code ... but I just checked in Firebug (NET panel), and there is no 404, just a 301 if you add the php redirect to the top of the 404.php page.

Next Topics on Trending Feed