404s on Grav generated pages like '/sitemap'

I have been using a plugin I built to alert me of 404 errors so I can fix them quickly. I have noticed that pages generated by Grav throw 404 errors internally even though the user gets the proper page.

This includes:

  • /sitemap
  • /random
  • /search

I’m just going to add a filter to my plugin, but I thought I should note this behavior for the team.

It’s normal because they are not real pages, so Grav does not find them and issues the onPageNotFound event, is this what you are getting alerted of?

They hook into the Grav lifecycle to provide output for those routes.