Why is the 404 error log always empty?

#679238
  • Resolved 陈先生
    Rank Math free

    The website has been running for several months. After manually deleting some web pages and then clicking to test, the frontend of the web pages displays a 404 error. However, the 404 Monitor management page in Rank Math’s backend does not show any 404 records and remains empty. What could be the reason for this situation?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello, we apologize for the inconvenience you’re experiencing with the 404 Monitor in Rank Math.

    It’s unusual that the 404 Monitor is not capturing any records even after encountering 404 errors on the frontend of your website. This could be due to a few reasons:

    1. Caching: If you have a caching plugin or server-side caching enabled, it might be preventing the 404 errors from being logged. Please ensure that the caching is not interfering with the logging process.

    2. Plugin Conflict: There might be a conflict with another plugin that is preventing the 404 errors from being recorded. To check for this, you can temporarily deactivate other plugins and see if the 404 errors are then captured.

    3. Server Configuration: It’s possible that the server configuration is preventing the logging of 404 errors. You may need to check with your hosting provider to ensure that there are no server-level restrictions in place.

    4. Rank Math Configuration: Double-check that the 404 Monitor module is enabled in Rank Math’s settings and that it is set to capture the errors.

    If none of these steps resolve the issue, please assign this ticket to our support team using the available button, and we will investigate further to help you resolve this issue.

    Sources:
    How to Monitor 404 Errors with Rank Math SEO Plugin
    Rank Math General Settings
    How to Fix 404 Errors with Rank Math SEO Plugin
    Rank Math Status and Tools » Rank Math

    Hello,

    Thank you for contacting Rank Math support.

    Please navigate to Rank Math > Status & Tools > Database Tools > Clear 404 Log to clear your 404 error log and start afresh. While at it, also clear your Rank Math transient from the same Database Tools.

    Please try these and let us know if it worked for you.

    Thank you for your patience and cooperation. Looking forward to hearing back from you.

    I have tried the method you suggested, but it still doesn’t work. The 404 records are still empty.

    Hello,

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

    If that’s the case, please update this Rank Math file 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.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘Why is the 404 error log always empty?’ is closed to new replies.