Skip to content

fix(star-tracker): add canonical tags, redirect HTTP to HTTPS - #140

Merged
wavekat-eason merged 2 commits into
mainfrom
claude/check-and-fix-6qjxzs
Jul 28, 2026
Merged

fix(star-tracker): add canonical tags, redirect HTTP to HTTPS#140
wavekat-eason merged 2 commits into
mainfrom
claude/check-and-fix-6qjxzs

Conversation

@wavekat-eason

Copy link
Copy Markdown
Contributor

Summary

Google Search Console flagged http://stars.wavekat.com/ (note: plain HTTP) as a "Duplicate without user-selected canonical" — the tools/star-tracker/ Cloudflare Worker never emitted a <link rel="canonical"> on any page and had no HTTP→HTTPS redirect, so Google was indexing the http:// and https:// variants as two identical, undeclared duplicates.

  • Add a Worker-level http://https:// 301 redirect (skipped for localhost/127.0.0.1 so wrangler dev still works over plain HTTP).
  • Add <link rel="canonical"> to every rendered page, pointing at the HTTPS PUBLIC_URL.
  • Add noindex to pages that shouldn't be indexed: /dashboard, the owner's tenant control panel (shows webhook secrets/backfill controls), /_admin, and the "not yet tracked" invite page (near-identical boilerplate per unregistered slug — a latent duplicate-content risk in its own right).

Test plan

  • npx tsc --noEmit passes in tools/star-tracker/
  • Deploy and confirm http://stars.wavekat.com/ 301s to https://stars.wavekat.com/
  • Confirm canonical tag renders correctly via view-source on /, /:slug, /:slug/:repo
  • Re-run the affected URL through GSC's URL Inspection tool after deploy to confirm the issue clears

Generated by Claude Code

claude added 2 commits July 28, 2026 01:45
…kat.com

Google Search Console flagged http://stars.wavekat.com/ as a duplicate
without a user-selected canonical. The Worker never emitted a
<link rel="canonical"> on any page and didn't redirect plain-HTTP
requests, so Google indexed the http:// and https:// variants as
separate identical pages. Add a canonical tag (and noindex on
account-gated / thin-duplicate pages: dashboard, owner tenant view,
admin, and the untracked-slug invite) to every page, and redirect
http -> https at the Worker.
…0.0.1

Broadens the local-dev exemption from a literal localhost/127.0.0.1
check to any IPv4 or bracketed IPv6 host, so wrangler dev bound to
0.0.0.0 or accessed via a LAN IP still works over plain HTTP.
@github-actions

Copy link
Copy Markdown
Contributor

@wavekat-eason
wavekat-eason marked this pull request as ready for review July 28, 2026 06:17
@wavekat-eason
wavekat-eason merged commit 9d4511e into main Jul 28, 2026
4 checks passed
@wavekat-eason
wavekat-eason deleted the claude/check-and-fix-6qjxzs branch July 28, 2026 06:17
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.

2 participants