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

How to redirect the default "404 page not found" error page in Ghost blog
Photo by Andrew Neel / Unsplash

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='https://www.flamingbytes.com/'" />
  </head>
  <body>
  </body>
</html>