Dealing with a client issue where the client has someone building fake URLs and pushing them into Google via a clever array of junk websites that randomly generate links daily. So far this has created over 4.3 million 404 URLs that appear in Google Search Console and make reports difficult to read.
The client's server and host do not allow the usage of ErrorDocument directive and offer no other way to handle this at scale. I found a nice little plugin called 404 to 301 which is handling this beautifully but for it to work I had to create a new 404 page inside of WordPress (when I tried using the standard 404.php it went into a loop).
This is technically going to work but it gives off a 200 OK status code and does not give off a 404 error status code, and if it did, it would cause the plugin I am using to loop and crash. Instead I've set the page's meta robots to "noindex" so all of the millions of randomly generated 404 URLs will just point to this one and get noindexed..
The client's server and host do not allow the usage of ErrorDocument directive and offer no other way to handle this at scale. I found a nice little plugin called 404 to 301 which is handling this beautifully but for it to work I had to create a new 404 page inside of WordPress (when I tried using the standard 404.php it went into a loop).
This is technically going to work but it gives off a 200 OK status code and does not give off a 404 error status code, and if it did, it would cause the plugin I am using to loop and crash. Instead I've set the page's meta robots to "noindex" so all of the millions of randomly generated 404 URLs will just point to this one and get noindexed..