A better 404 page

I’d like to create a custom 404 page that does more than direct users to the site front page.

For example, a list of recent past in each tag category and an on page search box. I managed to do this well when my site was on WordPress.

The specific page elements aren’t vital at this stage, but it needs to be more than cosmetic.

Are there any tutorials or other resources to help me here?

2 Likes

Hi,
You can add custom 404 page using this template: error-404.hbs

Thanks for this. I suspect this is the Ghost default error page… which is helpful.

do any themes have this built in? Any official themes? They all should. I’d at least want my header on the default error page.

this is pretty annoying when I accidentally send my email with a bad URL, and need to change it immediately. It’s good everywhere, but my email subscribers are stuck with the useless 404 page. Honestly, I wish Ghost could just figure it out…

Dan, did you know that you can actually change the URL in an email that’s been sent out? It’s a cool feature. :slight_smile:

You click the analytics button on the emailed newsletter (from the posts menu), then look for the edit arrow on the link.

I did, actually, but I didn’t realize you could update the link to the article itself. thanks!

It would be cool if Ghost could do this automatically when I change the url for the article.

I am in the process of creating an error.hbs for the Source theme but I would like to display messages in French depending on the type of error and I am unable to do so using an if loop and using the Statucode value. Does anyone understand what’s happening and how I can get out of it?