Skip to main content

BETANow in public beta.Public betaBeta

日本語Español

ERR-003 Published

404 page with similar-page suggestions

A 404 page that shows the URL people tried to open and, based on the words in it, lists close pages under “Were you looking for one of these?”.

FigmaThis part is included in our free, editable Figma file: 235 website UI patterns across 32 parts, 2 designs each Open in Figma Community ↗ (opens in a new tab)

Wireframe (desktop) | 404 page with similar-page suggestions

404 page with similar-page suggestions UI design (desktop wireframe)

Wireframe (mobile) | 404 page with similar-page suggestions

404 page with similar-page suggestions UI design (mobile wireframe)

What changes on mobile

  1. The URL wraps and shows in full: Even with a long URL, people can check for themselves where it went wrong.
  2. The page name is large: Text sizes differ so people choose by page name before reading the URL.
  3. The search box is prefilled: People for whom the suggestions were wrong can search right away without retyping.

Before you choose this pattern | 404 page with similar-page suggestions

Good fit

  • Many people mistype URLs or cannot find pages that have moved
  • The URLs contain words that describe the page content
  • The site structure has just changed, and people still arrive from old URLs
  • You can set up a way to produce suggestions (site search or a mapping table)

Poor fit

  • The URLs are only numbers, so no suggestions can be made from words (the 404 page with popular pages works better)
  • You cannot set up a way to produce suggestions (the 404 page with search works better)
  • It is clear which new URL each old URL maps to (in that case, redirect with a 301)

Why this wireframe works | 404 page with similar-page suggestions

It shows the URL that was opened, as is

Seeing what they tried to open helps people notice their own typos. The URL is shown exactly as typed inside a light box.

It suggests close pages from the words in the URL

Even with a typo like “servise” or a URL from before a restructure, part of the words remains. Up to three close pages are listed from those words, closest first.

The closest suggestion gets a badge

With several options, people are unsure which to pick. The closest one is marked “Closest match” to show what to look at first.

The search box is prefilled for when the suggestions miss

Some people will not find their page among the suggestions. A search box filled with the word from the URL lets them search right away.

Common mistakes when building it

Redirecting automatically to the closest suggestion

If the suggestion is wrong, people end up reading a different page without knowing what happened. Use a 301 redirect only when the mapping is certain; otherwise show the pages as suggestions and let people choose.

Showing too many suggestions

Listing ten or more similar pages makes it no different from ordinary search results. Narrow it to three at most, closest first.

Writing the opened URL straight into the page

Writing the characters of the URL into the page as they are can let a malicious script run. Escape the URL as text before displaying it.

An empty heading shows when there are no suggestions

If only the heading “Were you looking for one of these?” is left with nothing under it, the page looks broken. When there are no suggestions, leave out the whole heading and guide people with search and popular pages.

Frequently asked questions

How do I produce the suggestions?

One way is to run a site search with the words in the URL and show the top results; another is to find pages whose URLs are spelled similarly. If you restructured the site, a table mapping old URLs to new ones is the most reliable source.

If I know the old URL, should I redirect instead of suggesting?

Yes. If each old URL maps to exactly one new URL, redirect with a 301. The 404 page with similar-page suggestions is for cases where the mapping is unclear, or for people who arrived through a typo.

Isn’t it a problem if the “Closest match” is wrong?

It can be wrong, so the heading asks “Were you looking for one of these?” rather than stating it. Put a search box under the suggestions so people can search again right away when they are wrong.

Related pages

Share this pattern

Send this page to your team or your design partner.

Was this pattern useful?

Written by

Yuta Okano

ENVY DESIGN Inc.

CEO / Director / Designer

14 years in the web industry. Has worked on more than 500 web projects, from corporate and recruiting sites to e-commerce. Focuses on information architecture, direction and design, from planning websites to improving them. In recent years he has focused on AIO (AI optimization) and GEO, helping sites get cited by generative AI search such as ChatGPT, Perplexity and Google AI Overviews.

Review and revision history

  1. Published AvatarYuta Okano Pattern published