Skip to content

Website: a real 404 page, and addresses that are not pages answer 404 - #95

Open
Skeyelab wants to merge 3 commits into
mainfrom
seo-not-found
Open

Skeyelab wants to merge 3 commits into
mainfrom
seo-not-found

Conversation

@Skeyelab

@Skeyelab Skeyelab commented Dec 3, 2026

Copy link
Copy Markdown
Member

What

Three things an audit of the live site found, all about addresses that are not pages.

  1. The 404 page was Next's default: two <title> tags, no site styling, no link back. app/not-found.tsx replaces it with one heading ("Page not found"), one sentence and a button to the home page. It has its own title and no canonical address or share card, since it is served at whatever address was asked for. Next still adds noindex.
  2. Some addresses answered wrongly. /404 returned 200 with the 404 page. /images and /_next redirected to /images/ and /_next/, which returned 403. In nginx.conf, /404, /404.html, /_not-found and /_not-found.html now return 404, and try_files no longer tries a folder, so folder addresses return 404 too. The home page / is unchanged.
  3. /favicon.ico returned 404. app/favicon.ico (16, 32 and 48 px, from the app icon) fixes that. The PNG icon stays.

Checked

  • tests/notFound.test.tsx (new): the page's heading, link and metadata, the nginx rules, and the favicon file.
  • yarn lint, yarn test:run and yarn build locally; out/404.html has one title, noindex, no canonical.
  • The nginx rules were not run locally (no Docker on this machine). CI's "Docker image" step now checks them against the real image: /nope shows the new page with a 404, the six addresses above return 404, /favicon.ico returns 200, and / still serves the page. That is the one change outside website/: seven lines in .github/workflows/ci.yml.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VCgWWseQZtUzcSRzjqqQJQ

@Skeyelab
Skeyelab enabled auto-merge (squash) December 3, 2026 06:49
Skeyelab and others added 2 commits December 3, 2026 02:01
- app/not-found.tsx replaces Next's default 404, which had two <title> tags and no way back: one heading, one
  sentence and a link to the home page, with its own title and no canonical address or share card.
- nginx: /404, /404.html and /_not-found answered 200 with the 404 page; they are a 404 now. /images and /_next
  redirected to a slash address that answered 403; they are a 404 now (try_files no longer tries a folder).
- app/favicon.ico, from the app icon: /favicon.ico was a 404, and crawlers ask for it by that name.

CI's Docker step checks each of these against the real image. The nginx rules were not run locally.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VCgWWseQZtUzcSRzjqqQJQ
Without "$uri/" in try_files the catch-all location no longer found "/": CI's Docker step got a 404 for the home
page. "location = /" serves index.html directly.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VCgWWseQZtUzcSRzjqqQJQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant