404 Did You Mean

404

That page moved

We could not match this address, but one page comes close. Old links keep working for six months after a move.

/docs/install/quick-start

About this block

404 Did You MeanFREE

Left-aligned 404 for documentation and marketing sites: the requested path is shown struck through in monospace above a did-you-mean box linking to the closest matching page.

Error9: 404 Did You Mean

A left-aligned 404 for sites where URLs move: the address that failed is printed struck through in monospace, and directly beneath it a did-you-mean box links to the closest matching page.

Free block

This block is free. No license or account is required: install it with the CLI and use it in unlimited projects.

Installation

Radix flavor

bash
npx shadcn add "https://ui.beste.co/r/error9"

Base UI flavor

bash
npx shadcn add "https://ui.beste.co/r-base/error9"

This installs the block to components/beste/block/error9.tsx, plus the button shadcn/ui primitive it uses for the closing action.

Quick start

The installed file exports error9Demo alongside the block: the exact props behind the preview above. Spread it to get a working page in one line.

tsx
import { Error9, error9Demo } from "@/components/beste/block/error9";

export default function NotFound() {
  return <Error9 {...error9Demo} />;
}

Feed it the real pathname and whatever your redirect map suggests:

tsx
"use client";

import { usePathname } from "next/navigation";
import { Error9 } from "@/components/beste/block/error9";

export default function NotFound() {
  const pathname = usePathname();

  return (
    <Error9
      code="404"
      heading="That page moved"
      description="We could not match this address, but one page comes close."
      requestedPath={pathname}
      suggestionLabel="Did you mean"
      suggestion={{ label: "/docs/getting-started", href: "/docs/getting-started" }}
      button={{ label: "Back to home", href: "/" }}
    />
  );
}

Props

PropTypeDefaultDescription
codestringSmall uppercase status label above the heading
headingstringMain page heading, rendered as an h1
descriptionstringExplanatory paragraph under the heading
requestedPathstringThe address that failed, printed struck through in monospace
suggestionLabelstringLead-in text inside the suggestion box
suggestionActionLinkThe closest matching page, linked from inside the box
buttonActionLinkOutline button at the bottom
classNamestringExtra classes for the outer <section>
ts
type ActionLink = {
  label: string;
  href: string;
};

Behavior notes

  • The failed path is truncated with truncate, so a long URL shortens with an ellipsis instead of wrapping across lines and pushing the suggestion box down.
  • The suggestion link itself uses break-all, so a long suggested path wraps inside the box rather than overflowing it.
  • The suggestion box only renders when suggestion is set. suggestionLabel on its own renders nothing, which keeps the block usable as a plain 404 when no match was found.
  • The block is static markup with no client state, so the suggestion has to be computed by the caller (a redirect table, a slug distance check) and passed in.

More Error blocks

View all Error
PRO

error13

404 With Site Directory

404 page that doubles as a sitemap: left-aligned messaging over four columns of grouped section links, so visitors on a large site can jump straight to the area they wanted.

PRO

error5

404 Support Panel

Card-style 404 panel that echoes the requested URL in monospace, pairs a browser-history back button with link actions, and closes with a support and status link row.

PRO

error36

Not Found With Search

A not-found page that offers a way forward rather than a way back, pairing an oversized light heading with an image tile floating a live search panel and a two-column hairline list of likely destinations.

FREE

error2

404 With Site Search

Search-first 404 page: a controlled search field with a submit handler, plus a bordered list of suggested pages with titles, descriptions, and hover arrows.

PRO

error30

Search Led 404

Monochrome 404 that hands the visitor a search field: a display headline with a muted emphasis clause, a rounded search bar with a circular submit seal wired to a callback, and a ruled list of the most travelled routes.

FREE

error1

Centered 404 Message

Minimal centered 404 page with a large error code, a heading, a short explanation, two call-to-action buttons, and a divided row of popular page links underneath.