404 Monitor doesn’t work- blank

#945669
  • Resolved sorendigital21
    Rank Math business
    Content AI Expert

    I use the 404 monitor on other sites and it is working and great, but on a site it simply won’t work no matter what I have tried (reactivating, advanced mode etc)

    Please help? We just launched the site and it would be really helpful.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    We apologize for the issue you are facing with the 404 Monitor not displaying any data on your site. Since you mentioned that it works well on other sites, there could be a few reasons why it might not be functioning as expected on this particular site.

    Here are some steps you can take to troubleshoot the issue:

    1. Ensure the 404 Monitor Module is Enabled: Double-check that the 404 Monitor module is enabled in your Rank Math settings. You can do this by navigating to Rank Math SEO → Dashboard and ensuring the 404 Monitor module is activated.
      Enable 404 Monitor module

    2. Check for Errors: If the 404 Monitor is enabled but still shows a blank log, try generating some 404 errors intentionally by visiting non-existent URLs on your site. This will help determine if the monitor is capturing any data.

    3. Review Site Settings: Ensure that there are no conflicting plugins or settings that might be affecting the functionality of Rank Math. Sometimes, caching plugins or security settings can interfere with how errors are logged.

    4. Switch to Advanced Mode: Since you mentioned trying advanced mode, make sure you have selected Advanced in the 404 Monitor settings. This mode captures more detailed information about 404 errors.
      404 Monitor Mode settings

    5. Log Limit Settings: Check the Log Limit setting in the 404 Monitor. If it’s set too low, it might not display any errors. You can increase this limit to see if it helps.
      404 Monitor Log Limit

    If after trying these steps the issue persists, please reply to this ticket, and a human agent from the Rank Math Support team will take over and assist you further. Thank you for raising this concern, and we hope to resolve it quickly for you!

    Hello,

    This usually happens when you’re using a custom 404 page on your site.

    To verify that, you can update this Rank Math file on your website via FTP – /plugins/seo-by-rank-math/includes/modules/404-monitor/class-monitor.php

    Then in line 53, change this:
    $this->action( $this->get_hook(), 'capture_404' );

    To this:
    $this->action('template_redirect', 'capture_404' );

    Once done, check again the 404 Monitor and see if it’s already logging them.

    Please note that you may need to modify the code above each time you update Rank Math to detect your 404s.

    Let us know how this goes.

    sorendigital21
    Rank Math business
    Content AI Expert

    Ah!
    That was it.

    For the time being I just turned off my custom 404, but I will try adding that code when I get some time.
    Thanks for your help.

    Hello,

    We are glad to be of help.

    If you’re using plugins like Elementor or others to create custom 404 templates, then use this filter to permanently update the hook accordingly to enable Rank Math to monitor these custom 404 pages.

    /**
     * Filter to update the hook used for monitoring 404 pages
     */
    add_filter( 'rank_math/404_monitor/hook', function($hook ){
        return 'template_redirect'; //change to your preferred hook
    });

    Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Don’t hesitate to let us know if you need our assistance with anything else.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this ticket.