Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support devnihil

    (@devnihil)

    @soupia18 You can remove the noindex tag from a specific page by using a developer filter. You can find examples of this here.

    I tested adding the following code snippet to the functions.php file, and was able to confirm that it successfully removed the noindex tag from the 404 page of a test site:

    add_filter( 'wpseo_robots', 'yoast_seo_robots_remove_404' );
    
    function yoast_seo_robots_remove_404( $robots ) {
      if ( is_404() ) {
        return false;
      } else {
        return $robots;
      }
    }

    Regarding your question about the idea and benefits of adding a noindex tag to the 404 page, this is because having a 404 page be indexed in Google’s search results is not a useful result for users. You can read more on this topic in the following article: Which pages to noindex or nofollow.

    • This reply was modified 2 years, 9 months ago by devnihil.
    Thread Starter soupia18

    (@soupia18)

    Hi there – thanks for the response and the info to remove the noindex.
    Greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘404 Error page – Remove Noindex’ is closed to new replies.