Skip to content

fix(website): serve 410 for removed legacy URLs#291

Merged
denhamparry merged 1 commit into
mainfrom
denhamparry.co.uk/fix/gh-issue-290
May 27, 2026
Merged

fix(website): serve 410 for removed legacy URLs#291
denhamparry merged 1 commit into
mainfrom
denhamparry.co.uk/fix/gh-issue-290

Conversation

@denhamparry
Copy link
Copy Markdown
Owner

Summary

Addresses part of #290 (Google Search Console index coverage findings).

Old blog content (/posts/*, /page/*, /cv/*) was permanently removed in a previous cleanup, but _redirects 301-redirected every one of those URLs to the homepage. Google treats bulk redirects-to-homepage as soft 404s, which is the likely source of the "Page with redirect" (3) and "Crawled – currently not indexed" (3) findings in the Search Console export.

This PR replaces those homepage redirects with 410 Gone responses (served via the generated 404.html body), the cleanest signal that the content is permanently gone so Google drops the URLs from its index.

Changes

  • _redirects: legacy content paths now return 410 instead of 301 → /
  • Canonical domain consolidation redirects (*.netlify.com, blog.*denhamparry.co.uk) are unchanged
-https://denhamparry.co.uk/posts/* https://denhamparry.co.uk/:splat 301!
-https://denhamparry.co.uk/page/*  https://denhamparry.co.uk/:splat 301!
-https://denhamparry.co.uk/cv/*    https://denhamparry.co.uk/:splat 301!
+/posts/* /404.html 410
+/page/*  /404.html 410
+/cv/*    /404.html 410

Follow-up (tracked in #290)

This fixes the redirect strategy. The remaining tasks still need the specific URLs from Search Console's Pages report:

  • Identify the single "Not found (404)" URL and confirm intent
  • Review the 3 "currently not indexed" URLs once the redirect change has propagated
  • Run "Validate Fix" in Search Console after deploy
  • Re-export and refresh google_analytics/ to confirm improvement

Verification

  • layouts/404.html exists, so Hugo emits /404.html for the 410 rule to serve
  • pre-commit hooks pass (gitleaks, cspell, prettier)

🤖 Generated with Claude Code

Old /posts/*, /page/* and /cv/* content was permanently removed but
_redirects 301'd these URLs to the homepage. Google treats bulk
redirects-to-homepage as soft 404s, which surfaced in Search Console as
"Page with redirect" and "Crawled - currently not indexed" findings.

Serve 410 Gone (via the generated 404.html body) so these removed pages
are dropped from the index cleanly. Canonical domain consolidation
redirects are unchanged.

Refs #290

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@denhamparry denhamparry merged commit 75208f1 into main May 27, 2026
10 checks passed
@denhamparry denhamparry deleted the denhamparry.co.uk/fix/gh-issue-290 branch May 27, 2026 18:53
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