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
- Go to your site's Settings tab
- Under Custom 404 Page, enter the path to your 404 file (e.g.,
404.html) - 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:
| Framework | Default 404 Path |
|---|---|
| Next.js | 404.html |
| Gatsby | 404.html |
| Astro | 404.html |
| Hugo | 404.html |
| Static HTML | Create 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.