How to disable WordPress redirect guess function

How to disable WordPress redirect guess function

  1. Home
  2. Knowledge Base
  3. How to disable WordPress redirect guess function

We’ve come across several sites where the WordPress redirect guess can cause issues – this is a horrible feature from an SEO perspective as can open a site upto negative SEO attacks.

Adding the below lines to your functions.php file should disable the redirect guess. You’ll need to clear your cache after this change for it to fully go live.


// Kills guess_404_function
add_filter( 'do_redirect_guess_404_permalink', '__return_false' );

// Makes strict guess instead of a loose one
add_filter( 'strict_redirect_guess_404_permalink', '__return_true' );

Was this article helpful?