How to create a custom 404 page on Jekyll2022-06-15
While on Google Search Console for this site, I found this error.
Submitted URL seems to be a Soft 404
I know I have a 404 page because I made it fun to have a message referencing Winnie-the-Pooh saying, “Oh bother!” However, in making this site, I forgot one piece that makes this an official 404 page and I’ll outline how to change that below.
GitHub’s documentation on GitHub Pages,
not only do you have to create a file named
404.html, it needs
the following in the YAML front matter.
--- permalink: /404.html ---
This should officially designate this page as the 404 page rather than a page that coincidentally has the same URL.
After adding this, my original 404 page was automatically removed from my sitemap page.