Support Forums

Custom 404 Page Not Displaying

Hello Everyone,

I’m having trouble getting my custom 404 page to show up when a bad path is entered. I’ve deployed a static 404.html page to the root of my project, but I keep getting the default Netlify 404 page when trying to enter a bogus path.

Netlify project domain: https://sip-dev.netlify.app/
GitHub project repo: GitHub - zac-heisey/sip: Secure Information Project (SIP) Website

Any help here is much appreciated. Thanks in advance!


@zac-heisey Welcome to the Netlify community.

Are you certain your 404 page isn’t inside of a folder called 404? When I visit your site at the address plus /404/index.html I see your custom error page.

I’ve work with Eleventy often and I always set my custom 404 as 404.md
Taking a look at your repo I can see that whilst the 404 is a html file it has markdown syntax… I don’t think Eleventy will be processing this file. Try changing the file extension to .md and deploy again.

I would add a permalink in the front-matter as well if this is common practice across the site. Like so:

title: 404
layout: base.njk
permalink: /404.html

Hope this helps :grinning:

1 Like

@gregraven @kylesloper Thanks for your help! I made some adjustments per your feedback and looks like things are now working as expected.