One of my best website was struck with 404 errors. Basically i don’t give a *it to what is happening to websites but this one is my favorite.I got a notification from Google that suggests to look into this matter. I tried to search for solutions like 301 redirect, but i don’t think that it would be good to redirect every “not found page” to home page. So i worked on this method.
If you are a novice just like me it will be better to use plugins instead of changing code or doing something crazy with your website.
You have to use two plugins for it.
First is Disable Search Slug : This plugin will disable the search slug that means the soft 404 error due to /search/label etc can be fixed with it. After enabling this plugin if any bot crawl your website with a /search/a-random-string-or-word will get a disabled page. It will also be removed from permalink structure.
Another is 410 for WordPress : this plugin sends Sends HTTP 410 (Gone) responses to requests for pages that no longer exist on your blog. To use this plugin you have to download all the soft 404 pages url from Google webmaster tools at once.
How to use this plugin for massive urls
First of all enable and activate this 410 plugin
Now visit its settings part that you can find on left of the WordPress management dashboard under plugins.You will be able to see the Manually add URLs box. Here you have to fill in the urls that you want to fix.
For multiple urls try this
Go to google webmaster dashboard then to your website >> crawl and crawl errors now choose > download and then download all of them in csv format.
Once done open and copy paste it to the box of 410 manually add urls. Now save it and try to open that url again. If it is fixed and shows “Sorry, the page you requested has been permanently removed.” Go back to Google webmaster dashboard just like i told previously and now click on the url’s checklist and then press mark as fixed button provided. That’s it.