canonical-web-and-design / practices

Guides and principles from the web team at Canonical and Ubuntu
https://canonical-web-and-design.github.io/practices/
Other
45 stars 30 forks source link

Should every 404 pages return search results? #127

Closed nottrobin closed 5 years ago

nottrobin commented 5 years ago

I realised that this is quite a nice experience (although wording could possible be improved):

https://jujucharms.com/ksplice/

image

Should we aim to do this with all 404 pages, as long as the site has search? We could start with www.ubuntu.com. Or maybe even if the site doesn't have search we could iframe in some Google search results or something?

bartaz commented 5 years ago

I guess the question is how meaningful the search results will be for whatever we can read from the erroneous URL.

In the https://jujucharms.com/ksplice/ example it's quite straightforward. We could do similar for https://snapcraft.io/something (where we already show search, but we could actually do the search - or at least fill the search input). But what if the URL is not that meaningful?

Sure - relevant search (possibly with results) on 404 page is nice experience, but is it practical on every site to make it officially recommended practice?

As a first step maybe - if there is a search on the site it should be included on the 404 page?

nottrobin commented 5 years ago

I'm struggling to think of an example where it wouldn't be helpful.

Let's say https://www.ubuntu.com/legal/contributors/agreement had moved to https://www.ubuntu.com/contributor-agreement, and we had forgotten to add a redirect, but people were still linking to the old URL. In this case search results would be helpful.

Let's say you think you remember a URL like https://www.ubuntu.com/cdk, but it doesn't actually exist. In this case, the search results aren't perfect - but it does eventually mention https://www.ubuntu.com/kubernetes.

404 pages tend to be pretty sparse, and some information is definitely better than nothing at all. The maas.io 404 page tries to provide slightly more information:

image

But that also seems pretty useless. I'm just thinking that even in the most obscure case, a list of search results it far more likely to be helpful to you than anything else that might be on that page.

caldav commented 5 years ago

Some data to inform that discussion:

Top 10 "404 pages" on ubuntu.com for the last 7 days

nottrobin commented 5 years ago

Thanks @caldav.

I'm imagining that how this would probably work is roughly by replacing "/", "?", "&" etc. with {space}, and simply using that as the search string.

So let's do a little bit of analysis of the results:

/countdown/904/countdown-9.04-1/countdown search results

I don't know what file they're looking for here - maybe it existed years ago? Anyway, the top search result is "Jaunty Countdown banners" mentioned in https://wiki.ubuntu.com/UbuntuWeeklyNewsletter/Issue135 - which may well be what you were looking for.

/index.php?title=Recuperar_GRUB search results

These search results expose where this 404 comes from (lots of links to http://www.guia-ubuntu.org/index.php?title=Recuperar_GRUB, which redirects to www.ubuntu.com), but doesn't help the user, who probably just wants to reach the homepage. I've filed a PR so that's exactly where they will now end up: https://github.com/canonical-websites/www.ubuntu.com/pull/4449

/help?os=ubuntu&ver=8.04 search results

This links first to https://wiki.ubuntu.com/Releases and second to https://help.ubuntu.com/community/Installation/SystemRequirements. The former is a help platform which mentions 8.04, and the latter doesn't look that relevant but at least lets you know help.ubuntu.com exists. So not completely useless.

/community/ubuntustory/licensing search results

I'm not sure where this person is trying to get to, but the first link is https://www.ubuntu.com/community, which might be useful.

/16.04 search results

The first result is http://releases.ubuntu.com/16.04/, which is perfect.

/18.04.1 search results

Ditto, the first result is http://releases.ubuntu.com/18.04.1/, which is also perfect.

/ru search results

This shows you pretty clearly that we don't have a dedicated Russian site, but shows you http://ru.archive.ubuntu.com/, which might be helpful.

/cn search results

The third result is https://cn.ubuntu.com/, which is probably what you wanted.

/download/Server search results

This shouldn't really be a 404 - I opened an issue: https://github.com/canonical-websites/www.ubuntu.com/issues/4448

Having said that, the first search result is (obviously) https://www.ubuntu.com/download/server, which is the next best thing.

/getu- search results

This is completely useless. What they were probably looking for is "Get Ubuntu", so they might want https://www.ubuntu.com/download, but there's not really any way we could have figured that out in an automated way. But I suppose it might be worth mentioning https://www.ubuntu.com/download on every 404 page, just 'cos it's so popular =).


Overall I'd say, search results are pretty damn helpful to people landing on 404 pages. Of course this is just ubuntu.com, but I do suspect examples from other sites would tell a similar story.

anthonydillon commented 5 years ago

I like the idea of suggesting 404 pages should contain search functionality. I believe we still need to clearly design the page as an error page and that the search is a secondary navigation section.

matthewpaulthomas commented 5 years ago

I suppose it might be worth mentioning https://www.ubuntu.com/download on every 404 page, just 'cos it's so popular =).

We already do that — in the footer sitemap on every page, including the 404 page. Search results are one way to get back on track after a 404, but global navigation is another. And the more stuff we add to a 404 page, the less obvious any global footer will be (and, possibly, the fewer people will recognize that it is a 404 page).

One way to counteract this would be to style the sitemap differently, on the 404 page, than on other pages. Another way would be to show fewer and simpler search results on the 404 page than for a normal search. The results display needs customizing anyway, to avoid claiming that you performed a “search for 'ksplice'” (for example) when in reality you did not perform a search at all.

Top 10 "404 pages" on ubuntu.com for the last 7 days

I recognize the causes of a couple of those, but I guess they should be discussed elsewhere.

nottrobin commented 5 years ago

And the more stuff we add to a 404 page, the less obvious any global footer will be (and, possibly, the fewer people will recognize that it is a 404 page).

Yep, I completely agree that a 404 page should be obviously a 404 page, and say so loudly (or maybe we should say "a 'not found' page" - only a small percentage of normal people know what a 404 is). Any other content, search results included, should be obviously secondary and not the central point of the page.

Another way would be to show fewer and simpler search results on the 404 page than for a normal search. The results display needs customizing anyway, to avoid claiming that you performed a “search for 'ksplice'” (for example) when in reality you did not perform a search at all.

Yep I agree completely. I don't think this should look exactly the same as the search results page - it should be styled and created appropriately for this page. I don't know what the right number of search results might be, but maybe 4 or 5? And yes, I wouldn't say "your search" like the jujucharms.com example. Maybe not even mention that these are "search results" - we might just want to call them "potentially useful links" or something.

These are all things we could mention if we wrote a practice about 404 pages.

matthewpaulthomas commented 5 years ago

I count 6/21 live sites listed as owned by the Web team that have site-wide search: www.ubuntu.com, Ubuntu Community Hub, Canonical Voices, Ubuntu Tutorials, Assets Manager, and Ubuntu blog. None of them have search results on their 404 page. So this wouldn’t be a “practice” in the descriptive sense of something we commonly do.

For the same reason, I think it’s premature as a prescriptive practice: we have little idea of how often it would be helpful. For example, some sites — like jujucharms.com and snapcraft.io — have search covering part of the site, not all of it. If someone follows a mangled link to snapcraft.io/blog/the-power-of-installed-base-snap-metrics, should the 404 page contain Store search results (the only kind snapcraft.io currently has)? Maybe not. And if someone temporarily makes their snap private, should the 404 page, where their listing usually is, include search results which would likely link to competitors? Again, maybe not. I suggest designing and implementing it on a few different sites, before working out whether there’s anything non-obvious that could be written up as a practice.

nottrobin commented 5 years ago

@matthewpaulthomas fair point. I think you're probably right, it's not a practice until it's implemented. Discussion moved to www.ubuntu.com: https://github.com/canonical-websites/www.ubuntu.com/issues/4481

I'll close this for now.