404 to 301 Plugin - Be Careful

Carreira

Regular Member
Joined
Sep 4, 2012
Messages
487
Reaction score
317
I was using the 404 to 301 Plugin to redirect broken backlinks like many guys I know here do (those who use it read this).

The plugin is harmful, it populates your site with backlinks for other sites that are stealth and only engines can read.

I use wordfence so I got the mail explaining this, and when I went to verify it is indeed true.

source:
Code:
https://www.wordfence.com/blog/2016/08/404-301-plugin-considered-harmful/

I instantly took the plugin down, those of you who use it may want to do the same.


 
Goodjob to wordfence then. Really shady to put those terms on gnu public license. Makes me wonder about some plugins that I had installed.
 
I just write it in htaccess to redirect 404 to home page. Never done my sites any harm.
 
I just write it in htaccess to redirect 404 to home page. Never done my sites any harm.

This is true of the strategy, but those using the actual plugin referenced might want to reconsider as OP suggested. Definitely the strategy remains sound though mickyfu, so thanks for reminding people of that.
 
Literally just added this bloody plugin last night, removed now. Thanks, will do it manually - I'm just so fucking lazy.
 
Shit, I am going to read, thanks for the info.
Edit:

By the way, some alternative for replace this plugin?
 
Shit, I am going to read, thanks for the info.
Edit:

By the way, some alternative for replace this plugin?

I replaced it with Redirection.I don't know if it's good or not but it has 500k installs..
 
Plugins are usually the lazy man's way or the non techie way's only option.

You can redirect the 404 pages to any page on your site in htaccess just as @mickyfu shared above.

If you do not know how to do that, pay a guy 5.00 to do it for you.

@Carreira, thanks for sharing this.
 
Got freaked out for a second. I use redirection plugins, doing it through .htaccess is something that I hadn't thought of. Fortunately I am using the "Redirection" plugin and not 404 - 301.

I don't have the code personally, I haven't got it sorted yet, but make sure to everyone who will be doing it in .htaccess to paste the code after "# END WORDPRESS" in your .htaccess. Failure to do so will result in the redirects being overwritten every time WP updates.
 
Go to cPanel -> file manager -> check " show hidden files (dot files) " open .htaccess and add this code at the bottom :

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . / [L,R=301]
 
Go to cPanel -> file manager -> check " show hidden files (dot files) " open .htaccess and add this code at the bottom :

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . / [L,R=301]

Thanks for the code. Will help a bunch of people who don't know how to do it manually, like me.
 
Multiple Solutions:

1- Edit 404.php and will add this code:
Code:
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".get_bloginfo('url'));
exit();
?>

2- Using Redirection Plugin:
Code:
https://wordpress.org/plugins/redirection/
Code:
https://wordpress.org/plugins/link-juice-keeper/
Code:
https://wordpress.org/plugins/all-404-redirect-to-homepage/

by the way, this htaccess rule not work, because wordpress already rewriting the URL when the requested file doesn't exist.
Code:
ErrorDocument 404 http://www.yousite.com

and this either, because replace the main rule of wordpress

Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . / [L,R=301]
 
Last edited:
just use Broken Link Checker !! you will be fine !
 
Stay away from this. OP is right. Most plugins I tried in WP are doing this crap. Just read the reviews.. Chiqui3d uses the right option!
 
thank for this valuable info. it save me from headache.
 
The error has been already fixed by the owner of the plugin with un update, no more need to uninstall and change plugin.
This is the official answer of the author
https://thefoxe.com/blog/404-to-301-plugin-detected-by-wordfence-here-is-what-actually-happened/
I unstalled that plugin in several sites, I was worry to have to uninstall it from all that sites, when I find this explanation, that it seems pretty trustable.

Seems shady to me, not trusting the guy anymore.
 
Go to cPanel -> file manager -> check " show hidden files (dot files) " open .htaccess and add this code at the bottom :

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . / [L,R=301]

Don't do this guys , my mistake . It will de-index your home page .

I'm still using 404 to 301 after the update made by the owner and after reading his article .
 
Back
Top