From cbcd317bb3317590c768c2e3628cccfc7fc43805 Mon Sep 17 00:00:00 2001 From: anthony Date: Fri, 31 Jul 2026 12:34:50 +0000 Subject: [PATCH] pit: a parked name is a page, not a 404 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /n/ answered 404 when nobody held the name. The body was the right page — the directory of what else lives under that ending — but the status said the URL had nothing at it. It does have something. This is the parking page every resolver and the browser extension send unpointed names to; it is the answer, not the absence of one. A 404 makes a working page read as broken to the browser, to a link checker, and to anything that looks at the status before the body. A malformed name still gets 400: `not-a-name` is not one label and one ending, and there is no page for it to be. Co-Authored-By: Claude Opus 5 (1M context) --- apps/pwa/src/routes/moshpit.mjs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/pwa/src/routes/moshpit.mjs b/apps/pwa/src/routes/moshpit.mjs index 836d641..34461e9 100644 --- a/apps/pwa/src/routes/moshpit.mjs +++ b/apps/pwa/src/routes/moshpit.mjs @@ -232,7 +232,12 @@ moshpitRouter.get("/n/:name", async (req, res) => { ? await quoteName({ tld, label: parsed.label, buyerId: req.user.id }) : null; - res.status(resolution.name_registered ? 200 : 404).send(page({ + // 200, not 404, even when nobody holds the name. The URL does have a + // resource — this directory is the parking page every resolver and the + // browser extension send unpointed names to, and it is the answer, not the + // absence of one. A 404 makes a working page read as broken to the browser, + // to a link checker, and to anything that treats the status before the body. + res.status(200).send(page({ title: resolution.name, body: directory({ resolution, tld, owner, names, tlds, quote, user: req.user, req }), }));