Skip to content

Add /archive.html redirect to /archives/ (fix Google 404)#27

Merged
singhsanjay12 merged 2 commits intomainfrom
ssingh1/add-archive-redirect
Feb 19, 2026
Merged

Add /archive.html redirect to /archives/ (fix Google 404)#27
singhsanjay12 merged 2 commits intomainfrom
ssingh1/add-archive-redirect

Conversation

@singhsanjay12
Copy link
Owner

Summary

  • Creates `archive.html` at the repo root, served at `/archive.html`
  • Redirects immediately to `/archives/` using meta-refresh and JS `window.location.replace`
  • Includes `` so Google consolidates ranking signals to the correct URL
  • No new dependencies — pure HTML, processed by Jekyll with `layout: null`

Testing Done

  • Test added: `test_archive_redirect_page_exists` verifies the file is built and contains the correct redirect target
  • Verify `/archive.html` redirects to `/archives/` after deploy

The old URL singh-sanjay.com/archive.html (no 's', with .html extension)
was indexed by Google but returns 404. Adding a meta-refresh + JS redirect
page at that path sends both browsers and crawlers to the canonical /archives/
page. The canonical link tag also signals the correct URL to search engines.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@singhsanjay12 singhsanjay12 force-pushed the ssingh1/add-archive-redirect branch from 5803570 to a159af5 Compare February 19, 2026 18:09
…ctors

archive.html is a bare redirect page (layout: null) with no theme chrome,
so it correctly has no visitor counter, Giscus, share buttons, or 5KB of
content. Exclude it by basename from built_posts and the all-pages visitor
counter check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@singhsanjay12 singhsanjay12 merged commit 7c4c039 into main Feb 19, 2026
1 check passed
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

Comments