How to fix sitemap not indexing on Lovable
If Google Search Console shows "Couldn't fetch" or "Invalid XML" on your Lovable site, the cause is almost always a hidden BOM (\uFEFF) at byte 0 ofsitemap.xml, or the file living in /public but never reaching /dist after build. Lovable uses Vite, and Vite copies public/ into dist/ before the closeBundle hook runs — so any sitemap generated incloseBundle is silently discarded. The prompt fixes the build order, strips the BOM, and adds an SSR /sitemap.xml route that always returns valid XML with the right Content-Type.
How to fix sitemap not indexing on Replit
Replit Agent ships the same Vite-based stack and hits the same build-order bug. If your Replit deployment serves /sitemap.xml as a 404, an HTML page, or with a leading newline, paste the prompt into Replit Agent chat — it adds the copyGeneratedSitemapsToDist() step, sanitises every XML file, fixes robots.txt, and verifies the output starts with <?xml on byte 1.
How to fix sitemap not indexing on Base44
Base44 projects fail Google indexing for the same three reasons: a stray BOM, the sitemap missing from the deployed build, or a robots.txt that disallows crawlers or points at the wrong URL. The prompt is build-tool agnostic and applies cleanly inside Base44's AI builder.
Adding an SSR sitemap to TanStack Start, Next.js or Vite SSR
A static sitemap goes stale the moment you add a new route. The prompt adds a server-rendered /sitemap.xml route that walks your live route tree at request time and returns absolute URLs with <lastmod>, <changefreq> and <priority> — with the correct application/xml; charset=utf-8 header and no HTML wrapper.
"Googlebot can't fetch my sitemap" — the actual checklist
- Open
/sitemap.xmlin your deployed preview and View Source — byte 1 must be<. - Confirm
dist/sitemap.xmlexists after build (not justpublic/). - Check
robots.txtpoints at the absolute sitemap URL on your live domain. - Make sure the response is
application/xml, nottext/html. - Resubmit in Google Search Console — "Couldn't fetch" usually clears within minutes.
The £2.99 prompt automates all five steps. Buy it once, paste it into any AI builder, and your sitemap is fixed.