The Case of the Broken 404 Page
(and how I fixed it)
This is one of those "ohhh... duh" beginner problems that feels obvious in hindsight but totally confused me at first. I couldn't find a straight answer online, so here's mine — maybe it'll save someone else the head-scratching.
So I faced this problem… I had coded my not_found page, and it looked alright when I previewed it using the VS Code Live Server, but then I tried it out on my actual site, and it looked like this:

I quickly figured out that it only looks broken when the path is a non-existent page inside a folder.
For example:
ridvenge.neocities.org/fakepage
→ works fine, shows the styled not found page.ridvenge.neocities.org/gallery/fakepage
→ absolutely scuffed.
How I fixed it: Basically, I just make every link point to the root folder.
At first, I linked all my images, links, and CSS as src="image/img.png"
because I thought
that, since those files are in the same folder as not_found.html
, it would find them — but
nope!
When you visit a non-existent page, Neocities shows the content of the not_found HTML.
It doesn't redirect you to not_found.html
. So if the unexist page is inside a folder
(ex.ridvenge.neocities.org/gallery/fakepage
), the browser tries to find
image/img.png
relative to that folder, like
gallery/image/img.png
, which doesn't exist.
So if you're facing the same problem: change all your links to src="/image/img.png"
(putting
a /
first to point to the root directory) and it should work as expected.