Expose /sitemap.xml for Bing + IndexNow

Astro's sitemap integration emits /sitemap-index.xml + /sitemap-0.xml. Bing
Webmaster Tools and IndexNow probe /sitemap.xml literally, so a request
for the canonical name was 404'ing. Two changes:

- astro.config.mjs: add a 301 redirect /sitemap.xml → /sitemap-index.xml
  (alongside the existing / → /en/ redirect)
- public/robots.txt: list both Sitemap URLs so any crawler that reads
  robots.txt finds an entry it can use directly

After production redeploys (`docker compose up -d --build`), submit
https://nibiru-framework.com/sitemap.xml in Bing Webmaster Tools — it'll
follow the 301 and ingest the index.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
stephan
2026-05-08 19:42:22 +02:00
parent f8f58c4ab9
commit 47bd4bf53f
2 changed files with 9 additions and 0 deletions

View File

@@ -15,6 +15,10 @@ export default defineConfig({
devToolbar: { enabled: false },
redirects: {
'/': '/en/',
// Bing/Yandex/IndexNow probe /sitemap.xml directly. Astro's sitemap
// integration emits sitemap-index.xml + sitemap-0.xml; add a 301 so
// either path resolves. Both are also referenced in robots.txt.
'/sitemap.xml': '/sitemap-index.xml',
},
integrations: [
AstroPWA({