How to redirect the default "404 page not found" error page in Ghost blog

When users access a non-existent page, they may see a page which shows the message “404 page not found” in Ghost blog.

We can redirect the page to another page by creating a error-404.hbs file under the theme folder.

In the following example, we redirect the users to the website home page when they access a non-existent page.

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="refresh" content="0; url='http://localhost:2368/'" />
  </head>
  <body>
  </body>
</html>