I’m facing an issue where my Jekyll site 404 page isn’t really working.
When visiting /404/ it works but when page doesn’t exist it shows the default Netlify 404.
My site url: https://nigerian.netlify.app
I’m facing an issue where my Jekyll site 404 page isn’t really working.
When visiting /404/ it works but when page doesn’t exist it shows the default Netlify 404.
My site url: https://nigerian.netlify.app
Hi @shoaiyb,
I visited https://nigerian.netlify.app/404/ and got a different 404 page than what Netlify serves. Have you managed to fix this?
Yes, I created 404.html file in the root project. And netlify generate /404/index.html which makes /404/ and 404 header to have difference.
Try visiting page that doesn’t exist, for example: https://nigerian.netlify.app/page/not/found.html
Hi @shoaiyb,
It’s not something Netlify is doing magically. Jekyll is probably configured to generate the page at /404/index.html
. It’s the same like what Hugo does.
You simply need to add a redirect rule as @coelmay mentioned.
I know this is an old topic, but I managed to resolve this by adding permalink: /404.html
to the front matter of the 404 page so it wasn’t put in /404/index.html
Hi, yes old but this helps other folks who stumble upon this thread. I appreciate you sharing your solution!