Live data from Hacker News

Designing a website without 404s

pillser.com

21–30 of 109 posts

Re: Designing a website without 404s

#21

This really isn't crowing but we created a dynamic site that used HyperCard as a CGI and we did that in 1984. Not kidding. Mosaic'd up to the hilt. Still, it's a good idea. You can further this idea (especially when the slug returns nothing) by having this page also list "Best Bets" or what people most often come to your site for (regardless of any search query, perhaps, with their referrer, or on this day of the wee…

Must have been later than 1984 or I'm misunderstanding - HyperCard was released in the late 80s, and NCSA Mosaic wasn't released until 1993.

Re: Designing a website without 404s

#22
post #15

> I am surprised that more websites do not implement it Maybe because it is not a good idea. Masking errors is harmful. The information "what you're looking for is not there" is very important, because it lets users identify that something is wrong. Smart redirection can be outright dangerous: what if I am buying a medication, and the smart website silently replaces the correct drug with something similar but wrong?…

Most people who use this site would use the search bar, which reports errors, and those who directly type it in aren't exactly laypeople.

Until the link changes and google redirects them or their email link incorrectly. Without 404s you get hit with a google duplicate penalty as many urls resolve to the same page.

Re: Designing a website without 404s

#24
post #6

This just seems like it's co-opting the url into a "search". Just have a normal search page where users can type in what they want if they want fuzzy matching. Or have the 404 page contain a search page. I don't think using the url as a "fuzzy search" is the right application.

You can do this and still 404, even. There is rarely a good reason not to 404 when you don’t recognize the URL, even if you want to try to do something helpful with the 404 page.

Yup. I would highly recommend a helpful 404 page rather than "silently" redirecting the user to a different page that they didn't type. Just put a search box, a link to the homepage and "Did you mean these similar pages:" with a list of links.

Re: Designing a website without 404s

#27
That seems like a solution for a problem that shouldn't exist in the first place.

> a product is renamed, or the logic used to generate the URL changes.

In that case you should store both urls and have a redirect_to_id or something similar to give search engines and users a proper 301. I don't see a use case for this fuzzy matching which will just make things not very explicit and unpredictable.

Re: Designing a website without 404s

#28

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 issu…

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

Re: Designing a website without 404s

#29
I half like the idea.

I do think that it's ok for several URLs to point to the same content. In his example all three are fine. I also tried the product code (6066) without any of the text and it worked fine as well.

I've also noticed Lego's site does a version of this as well. https://www.lego.com/en-us/product/10334 will take you to the product page for the Retro Radio. However, I think Lego's site is just keying in on the product id as "retro-radio" doesn't work, but "ret-rad-10334" does.

But there are limits.

I put in the URL "https://pillser.com/supplements/go-fuck-yourself" to see what would happen. Now, I chose an offensive phrase to increase my chances of not coming close to any real product. I believe that URL should 404, but it took me to the page for the supplement "On Your Game" instead. If I had tried a real name and got taken to something with only the barest resemblance to the name I tried, I wouldn't be thinking "This must be the closest match". I'd think the site did something messed up or I typed something wrong or something malicious had happened.

Re: Designing a website without 404s

#30

pillser.com/supplements/vitamin-1973-omg-i-can-type-anything-here-and-it-still-works-i-dont-think-this-is-good-idea clickable: https://pillser.com/supplements/vitamin-1973-omg-i-can-type-...

You can do that with many websites that have ids in their SEO slugs, this is usually not an issue as it's still standardized in a way that the string is just split into the id and the rest and you can look it up with both parts.

Popular libraries like https://github.com/norman/friendly_id implement it like that too.

Post reply on HN