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:
@@ -15,6 +15,10 @@ export default defineConfig({
|
|||||||
devToolbar: { enabled: false },
|
devToolbar: { enabled: false },
|
||||||
redirects: {
|
redirects: {
|
||||||
'/': '/en/',
|
'/': '/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: [
|
integrations: [
|
||||||
AstroPWA({
|
AstroPWA({
|
||||||
|
|||||||
@@ -115,4 +115,9 @@ Allow: /
|
|||||||
Disallow: /api/
|
Disallow: /api/
|
||||||
|
|
||||||
# ── Sitemaps ───────────────────────────────────────────────────────────────
|
# ── Sitemaps ───────────────────────────────────────────────────────────────
|
||||||
|
# /sitemap.xml is a 301 to /sitemap-index.xml (Astro emits the index
|
||||||
|
# automatically + one child sitemap-0.xml). Both URLs are listed so any
|
||||||
|
# crawler that probes either path lands on the same content. Bing's
|
||||||
|
# Webmaster Tools and IndexNow tend to look for /sitemap.xml literally.
|
||||||
|
Sitemap: https://nibiru-framework.com/sitemap.xml
|
||||||
Sitemap: https://nibiru-framework.com/sitemap-index.xml
|
Sitemap: https://nibiru-framework.com/sitemap-index.xml
|
||||||
|
|||||||
Reference in New Issue
Block a user