diff --git a/apps/web/src/app/globals.css b/apps/web/src/app/globals.css
index 51cba85..22fea4a 100644
--- a/apps/web/src/app/globals.css
+++ b/apps/web/src/app/globals.css
@@ -313,6 +313,27 @@ a:hover {
color: var(--ink-2);
}
+/* Not found */
+
+.not-found {
+ display: flex;
+ flex-direction: column;
+ gap: var(--space-8);
+ padding-block: var(--space-16) var(--space-24);
+}
+
+.not-found-title {
+ font-size: var(--text-title);
+ font-weight: var(--weight-strong);
+ line-height: var(--leading-tight);
+ letter-spacing: var(--tracking-title);
+}
+
+.requested-path {
+ color: var(--ink);
+ overflow-wrap: anywhere;
+}
+
/* Report: head */
.report {
diff --git a/apps/web/src/app/not-found.test.tsx b/apps/web/src/app/not-found.test.tsx
new file mode 100644
index 0000000..5dad5ac
--- /dev/null
+++ b/apps/web/src/app/not-found.test.tsx
@@ -0,0 +1,14 @@
+import { renderToStaticMarkup } from 'react-dom/server';
+import { expect, test, vi } from 'vitest';
+import NotFound from './not-found.tsx';
+
+vi.mock('next/navigation', () => ({ usePathname: () => '/pricing' }));
+
+test('says the page is missing, names the address, and offers a scan and the home page', () => {
+ const html = renderToStaticMarkup();
+ expect(html).toContain('
Page not found
');
+ expect(html).toContain('/pricing');
+ expect(html).toContain('class="scan-form compact"');
+ expect(html).toContain('Back to the home page');
+ expect(html).toContain('class="site-header"');
+});
diff --git a/apps/web/src/app/not-found.tsx b/apps/web/src/app/not-found.tsx
new file mode 100644
index 0000000..35472dd
--- /dev/null
+++ b/apps/web/src/app/not-found.tsx
@@ -0,0 +1,27 @@
+import type { Metadata } from 'next';
+import { RequestedPath } from './requested-path.tsx';
+import { ScanForm } from './scan-form.tsx';
+import { SiteHeader } from './site-chrome.tsx';
+
+export const metadata: Metadata = { title: 'Page not found ยท stackprobe' };
+
+// Any address that doesn't exist. Next sends it with a 404 status.
+export default function NotFound() {
+ return (
+ <>
+
+
+
+
Page not found
+
+ There's no page at . Scan a domain, or go back to the home page.
+
+
+
+
+ Back to the home page
+
+
+ >
+ );
+}
diff --git a/apps/web/src/app/requested-path.tsx b/apps/web/src/app/requested-path.tsx
new file mode 100644
index 0000000..768115e
--- /dev/null
+++ b/apps/web/src/app/requested-path.tsx
@@ -0,0 +1,9 @@
+'use client';
+
+import { usePathname } from 'next/navigation';
+
+// The address that was asked for, which the not-found page isn't given on the server.
+export function RequestedPath() {
+ const path = usePathname();
+ return {path || 'this address'};
+}