Hacker News new | past | comments | ask | show | jobs | submit login

WordPress does this sort of thing, or at least can (I don’t know, I’ve only ever been involved with a couple of WordPress sites). It’s obnoxiously awful. You end up with people accidentally relying on non-canonical URLs that subsequently change in meaning, or using links that seem to work but actually give the wrong content and you don’t notice. Both of these are very often much worse than a 404. There’s also an issue where articles can become inaccessible from their correct URLs, due to something else taking precedence in some way; I wouldn’t say that’s fundamental to the technique, but I do think that the philosophy encourages system designs where this can happen. (Then again… it’s WordPress, which is just all-round awful, technically; maybe I shouldn’t blame the philosophy.)

So no, please don’t ever do this.

But what you can do is provide a useful 404 page. Say “there’s no page at this URL, but maybe you meant _____?” Although there’s a strong custom of 404 pages being useless static fluff, you are actually allowed to make useful 404 pages. Just leave it as a 404, not a 3xx.

(Also, care about your URLs and make sure that any URL that ever worked continues to work, if the content or an analogue still exists at all. Distressingly few people even attempt this seriously, when making major changes to a site.)




Agree. When it's clear the content is no longer there, one of the big values of a 404 page is that you can at least hit Archive.org straight afterward to see if there's a version there.


Technically the 410 status code would be the correct one in that case.


Agree and was my first thought as well. A useful 404 seems favorable in most cases, although the author notes that the URLs are constantly changing, being rebranded, and so it might be the simplest solution for the supplement pages. However, I'd probably __not__ apply it to the rest of the website like the author suggests.


You could even make your 404 page embed your search, knowledge base and FAQs.


There used to be a plugin (or something) that would let you play Zork on a 404 page.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: