Only added a layout to config/layouts.json if there is front matter in the layout.
Added admin page in backend to set the 404 page.
Created 404 page controller, model, template.