Skip to main content

Custom 404 Page

By default, WebStadia shows a generic "File not found" page when a visitor requests a URL that doesn't exist. You can replace this with your own custom 404 page.

Setting a custom 404 page​

  1. Go to your site's Settings tab
  2. Under Custom 404 Page, enter the path to your 404 file (e.g., 404.html)
  3. Click Save

How it works​

When a request returns a 404 status, WebStadia checks if the custom 404 page file exists in your deployed site. If it does, it serves that file with a 404 status code.

Most static site generators create a 404.html file automatically:

FrameworkDefault 404 Path
Next.js404.html
Gatsby404.html
Astro404.html
Hugo404.html
Static HTMLCreate your own 404.html

Example​

Create a 404.html in your site's root:

<!DOCTYPE html>
<html>
<head>
<title>Page Not Found</title>
</head>
<body>
<h1>404 - Page Not Found</h1>
<p>The page you're looking for doesn't exist.</p>
<a href="/">Go back home</a>
</body>
</html>

Then set 404.html as your custom 404 path in the settings.