fix(website): serve 410 for removed legacy URLs#291
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_redirects301-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.htmlbody), the cleanest signal that the content is permanently gone so Google drops the URLs from its index.Changes
_redirects: legacy content paths now return410instead of301 → /*.netlify.com,blog.*→denhamparry.co.uk) are unchangedFollow-up (tracked in #290)
This fixes the redirect strategy. The remaining tasks still need the specific URLs from Search Console's Pages report:
google_analytics/to confirm improvementVerification
layouts/404.htmlexists, so Hugo emits/404.htmlfor the 410 rule to serve🤖 Generated with Claude Code