Adding a custom 404 – Not Found page
You can override Surge’s default 404 – Not Found page with your own, completely custom one by adding a 404.html
file in the root of your project.
If you’re using a static site generator like Jekyll, or other build tool like Grunt or Gulp, you can also have these tools geneate the 404.html
file for you.
Now, just run surge
again to publish the updated version of the site:
surge
You can also read more about getting started with Surge.
The default 404 page
By default, if someone attempts to visit a URL on your project’s custom domain or subdomain where there is nothing to serve, they will see Surge’s default 404 page, shown below: