Skip to content

fix: repair /privacy 404 (broken links + non-firing redirect target)#7

Merged
kitfunso merged 1 commit into
masterfrom
fix/privacy-404
Jun 4, 2026
Merged

fix: repair /privacy 404 (broken links + non-firing redirect target)#7
kitfunso merged 1 commit into
masterfrom
fix/privacy-404

Conversation

@kitfunso

@kitfunso kitfunso commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Problem

/privacy returned 404 (on production too). Two issues:

  1. The contact page linked to /privacy (a path with no page). CookieConsent.astro did too, but it's an unused/orphaned component.
  2. The public/_redirects /privacy -> /privacy-policy alias never fired - its target /privacy-policy is not a real file (the page is served at /privacy-policy/). A redirect to a non-asset path 404s, which is why /sitemap.xml -> /sitemap-index.xml works (real file) but /privacy didn't.

Fix (3 files)

  • contact.astro + CookieConsent.astro: link to /privacy-policy/ (the served URL).
  • _redirects: target /privacy-policy/ (trailing-slash served URL) so the alias 301s.

Verified on CF preview deploy

  • /privacy -> 301 -> /privacy-policy/ -> 200 (was 404).
  • /privacy/ -> 301 -> /privacy-policy/.
  • Contact page links to /privacy-policy/; build has 0 href="/privacy" left.
  • Build green (224 pages), 898 tests pass.

Note: CookieConsent.astro is currently unused (not imported anywhere) - fixed preemptively.

🤖 Generated with Claude Code

Two internal links pointed at /privacy, which has no page and 404'd. The
public/_redirects /privacy alias never fired either: its target /privacy-policy
is not a real file (the page is served at /privacy-policy/), and a redirect to
that exact non-asset path 404s - whereas /sitemap.xml -> /sitemap-index.xml
works because the target IS a real file.

- contact.astro + CookieConsent.astro: link to /privacy-policy/ (the served URL).
  CookieConsent is an unused/orphaned component; fixed preemptively.
- _redirects: target /privacy-policy/ so the alias 301s instead of 404ing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kitfunso kitfunso merged commit 5f9c021 into master Jun 4, 2026
2 checks passed
@kitfunso kitfunso deleted the fix/privacy-404 branch June 4, 2026 21:07
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