404 log stays empty

#588665
  • Resolved Anonymous
    Rank Math free

    Hi guys, my 404 monitor is staying empty while I for sure know that there are numerous 404’s (just launched a new website with new url structure). Any ideas on what might cause this and how to fix this?

    Any help would be massively appreciated.

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

    Thank you for your query, and we are so sorry about the trouble this must have caused.

    We logged in to your site using the credentials provided in the sensitive data section of the ticket.

    Upon checking we could see that you have set the “Fallback Behavior” feature of the Rank Math plugin as “Redirect to Homepage” instead of “Default 404” under WordPress Dashboard > Rank Math > General Settings > Redirections.

    screenshot

    We have set it to “Default 404” and went ahead to /plugins/seo-by-rank-math/includes/modules/404-monitor/class-monitor.php in line 46, and replaced it using the WP File Manager Plugin:

    From this :

    
    $this->action( $this->get_hook(), 'capture_404' );
    

    To this one :

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

    Now the 404 logs appear as expected.

    screenshot

    Please be advised that, the solution will be overwritten, when you’ll update Rank Math in your site next time. Once you update Rank Math, you’ll need to edit the file and replace the line just as mentioned above. However, till the next update, this should work without any issue.

    The 404 template redirect could be coming from your theme and since by default, Rank Math can’t read these types of templates, you need to apply the solution presented above.

    Unfortunately, we don’t support this type of template at the moment so you may need to rely on this workaround applied to your website for now.

    We hope that helps, and please don’t hesitate to get in touch if you have any other questions.

    Thank you.

    Anonymous
    Rank Math free

    Hi guys,

    thanks so much. Is it perhaps possible that now my redirects aren’t working anymore?
    See https://www.houthandelwoerden.nl/wp-admin/admin.php?page=rank-math-redirections, I’ve built numerous redirects but alot of them still seem to throw a 404 instead of being 301’ed to the correct location. Please advise.

    Kind regards,

    Leon

    Hello,

    We logged in to your site again, and reverted the chnages made back to original state.

    Doing this helped us verify if this Redirection issue was due to the changes.

    Upon investigation we were able to confirm that the redirection issue is not happening due to the changes that we made related to the 404 monitor.

    We have again implemented the code for the 404 monitor to work so that you can sit back and do not have to do anything about that.

    However, regarding the redirection issue, it’s a server side error because it shows a 404 Not Found by Nginx.

    Unlike the normal 404, your server prevents the Rank Math redirections if the URL is a file.

    You will have to clarify this with your web host so the .html reaches Rank Math redirects

    We hope that helps, and please don’t hesitate to get in touch if you have any other questions.

    Thank you.

    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 3 replies - 1 through 3 (of 3 total)

The ticket ‘404 log stays empty’ is closed to new replies.