Alias /sitemap.xml on both sites + recover orphaned newTab commit#17
Merged
radinhamidi merged 2 commits intomainfrom Apr 30, 2026
Merged
Alias /sitemap.xml on both sites + recover orphaned newTab commit#17radinhamidi merged 2 commits intomainfrom
radinhamidi merged 2 commits intomainfrom
Conversation
Refined behavior per user feedback: - Top nav linkout items (Dashboard, Leaderboard, Docs on the marketing site; Toolkit on the leaderboard) now open in a new tab. Rationale: users navigating the menu bar are mid-task on the current page; sibling-site jumps shouldn't blow away their context. - Footer and in-page linkouts stay same-tab. Footer is rarely read at the top of attention; in-page references already get middle-click for new tab if the reader wants one. Implemented via the existing Header `newTab` prop (separate from `external` which only renders the icon). external + newTab are intentionally orthogonal so we can vary them per surface. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Google Search Console's "Add a sitemap" form auto-suggests /sitemap.xml when you start typing — and a lot of other tools (Bing, Yandex, IndexNow probes, humans) try /sitemap.xml first. @astrojs/sitemap only emits /sitemap-index.xml + /sitemap-0.xml, so /sitemap.xml was 404'ing on both querygym.com and leaderboard.querygym.com. That's the most likely cause of the GSC "Couldn't fetch" reports — the sitemap-index URL itself is fine. Fix: add a 200 rewrite (not a 301 redirect) in each project's _redirects so /sitemap.xml serves the index content directly. The 200 keeps the canonical URL stable for crawlers that already know about /sitemap-index.xml; new submitters can use either form. Verified locally: both build outputs include the rewrite rules in dist/_redirects. After deploy, retry GSC submission with whichever URL you prefer: https://querygym.com/sitemap.xml https://querygym.com/sitemap-index.xml https://leaderboard.querygym.com/sitemap.xml https://leaderboard.querygym.com/sitemap-index.xml Note: GSC "Couldn't fetch" status is also commonly transient for the first 24-48h while Google gets around to crawling. If the URL returns 200 in a browser, the submission is healthy. Also includes the orphaned-from-PR-#16 commit: "Top-menu linkouts use new tab; footer/in-page stay same-tab" which got pushed after that PR's merge. 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.
TL;DR
Both sitemap-index URLs are healthy (HTTP 200, valid XML, correct content-type, robots allows). I verified live with both regular curl and a Googlebot user-agent:
```
$ curl -s https://querygym.com/sitemap-index.xml
...https://querygym.com/sitemap-0.xml...
$ curl -s https://leaderboard.querygym.com/sitemap-index.xml
...https://leaderboard.querygym.com/sitemap-0.xml...
```
The sitemap files aren't broken. What was broken: `/sitemap.xml` (no `-index`) returned 404 on both sites — and that's the URL Google Search Console's "Add a sitemap" form auto-suggests when you start typing. If you submitted `sitemap.xml` to GSC, you'd get "Couldn't fetch" because that path 404'd.
Fix
Adds a rewrite to each project's `public/_redirects`:
```
/sitemap.xml /sitemap-index.xml 200
```
Status `200` is a rewrite (URL stays the same in the browser), not a redirect — `/sitemap.xml` now serves the index content directly. Both URLs work; either is valid to submit.
Also includes a recovery commit
PR #16 was merged before my final commit `9ba7648` ("Top-menu linkouts use new tab") landed in it. Cherry-picked here so:
After merge
GSC checklist (independent of this PR)
If submission still fails after the fix is deployed:
Test plan
🤖 Generated with Claude Code