Live data from Hacker News

Designing a website without 404s

pillser.com

1–10 of 109 posts

Re: Designing a website without 404s

#2
This is both a good and bad idea.

It is good because it will help most people and work for them.

It's bad because sometimes it will make people think they've found what they were looking for when what they had doesn't exist at all - but it gave them something that sounds similar.

I would at least have a "redirected from" banner at the top of the page when it triggers.

Re: Designing a website without 404s

#3
post #2

This is both a good and bad idea. It is good because it will help most people and work for them. It's bad because sometimes it will make people think they've found what they were looking for when what they had doesn't exist at all - but it gave them something that sounds similar. I would at least have a "redirected from" banner at the top of the page when it triggers.

> It's bad because sometimes it will make people think they've found what they were looking for when what they had doesn't exist at all - but it gave them something that sounds similar.

That would be true if all visitors would understand 404 pages exists, and they expect one for this website. I bet most people wouldn't know what to answer to the question "What you should see if there is no page for this supplement?"

It is true that there coul dbe some sort of message making the redirect explicit.

Re: Designing a website without 404s

#4
> the implementation is so simple that I am surprised that more websites do not implement it

I might be wrong but for me it’s because IRL this isn’t an issue. Users shouldn’t be finding/using random URLs to navigate the site. Where is this broken URL traffic coming from anyway? Are you trying to solve for people that randomly edit the URL and expect it work, most people don’t care about those users getting 404 because they should expect 404. They’re not real users they’re just playing around.

However, If you purposely changed the URL format after a lot of people have the old format bookmarked or indexed on the web, then do a 301 redirect to the new URL.

I’m not sure of the SEO implications of the described solution, however it seems like only risk and no upside.

Re: Designing a website without 404s

#5
I think this is a good idea for a site like this focused around searching for things because if you're going here to look up "revive" you're already expecting a search result not necessarily expecting to find a precise "revive" out of the gate. Adding this to the rest of the site or for other non-search focused sites showing something the user didn't ask for just because it's similar could be a lot worse experience than signaling "not found!". Especially for how rare a plain incorrect URL is a problem vs an expired resource.

Re: Designing a website without 404s

#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.

Re: Designing a website without 404s

#7
I'd definitely cache+throttle that if possible. Cache the 404 response, and if using a shared dB make a custom user/resource group/workload queue and put this service at a lower priority

Not sure how to best do that in postgres though, closest I can find is reserved connections per user. Idk maybe there's an extension or it's easy to do it in the webserver

https://www.postgresql.org/docs/current/runtime-config-conne...

Re: Designing a website without 404s

#8
> 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? Not to mention the pollution of the indexes of search engines with all the permutations of the same thing they may discover. Lastly, the U in URL stands for unique; the web is designed around unique locators and this rule shouldn't be broken without a very good reason.

Show the user (and the crawlers) a 404, and suggest your corrected URL in the content of.the 404, and let the user know that it's a guess, so they make an informed choice about the situation.

Re: Designing a website without 404s

#9
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.

My 2x: i've seen this implemented in the past and appreciated it. I think they used keyword match too, not just uri.

That said iirc it came up because they didn't have a proper 301/302 configured

Re: Designing a website without 404s

#10
post #4

> the implementation is so simple that I am surprised that more websites do not implement it I might be wrong but for me it’s because IRL this isn’t an issue. Users shouldn’t be finding/using random URLs to navigate the site. Where is this broken URL traffic coming from anyway? Are you trying to solve for people that randomly edit the URL and expect it work, most people don’t care about those users getting 404 becaus…

Agreed, when I have done a mass migration of old format urls I started with 302s to ensure that things worked then moved to 301s. I actually wrote a script that would capture and collect all urls that led to a 404 (just in case I missed an old format link).

301s also serve to inform search engines that your URL should be different and they update their index accordingly. My transition went very smoothly but it took prep work on my part to understand that 404s were inevitable and that I needed a plan to migrate that traffic.

Post reply on HN