fix(star-tracker): add canonical tags, redirect HTTP to HTTPS - #140
Merged
Conversation
…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.
Contributor
wavekat-eason
marked this pull request as ready for review
July 28, 2026 06:17
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
Google Search Console flagged
http://stars.wavekat.com/(note: plain HTTP) as a "Duplicate without user-selected canonical" — thetools/star-tracker/Cloudflare Worker never emitted a<link rel="canonical">on any page and had no HTTP→HTTPS redirect, so Google was indexing thehttp://andhttps://variants as two identical, undeclared duplicates.http://→https://301 redirect (skipped forlocalhost/127.0.0.1sowrangler devstill works over plain HTTP).<link rel="canonical">to every rendered page, pointing at the HTTPSPUBLIC_URL.noindexto 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 --noEmitpasses intools/star-tracker/http://stars.wavekat.com/301s tohttps://stars.wavekat.com//,/:slug,/:slug/:repoGenerated by Claude Code