One prompt. Every AI builder.

Fix your sitemap. Get indexed by Google.

Search Console keeps saying "Couldn't fetch" or "Invalid XML"? One copy-paste prompt fixes BOM, missing dist/, robots.txt and adds a proper SSR sitemap — for Lovable, Replit and Base44.

Choose your platform
· Charged as £2.99 GBP
Tailored prompt per platform+ SSR fix included

Recognise any of these?

If your sitemap is broken, you're losing organic traffic every single day.

Search Console says "Couldn't fetch" your sitemap.xml
"Invalid XML" error when Google reads your file
0 pages indexed even after weeks
Sitemap loads in browser but not from Googlebot
robots.txt points to the wrong URL
BOM (\uFEFF) hidden at the top of your XML
sitemap.xml missing from /dist after build
Old sitemap-static.xml causing duplicate URLs
SSR build serves an HTML wrapper instead of XML

What you get for £2.99

A battle-tested prompt that turns hours of debugging into one paste.

Fixes BOM & whitespace

Strips the invisible \uFEFF and any leading whitespace so <?xml is byte 1.

Copies public/ → dist/

Adds a Vite hook so sitemaps actually reach production builds.

Adds SSR sitemap

Server-rendered route with correct Content-Type and live URL coverage.

Fix Lovable / Replit / Base44 sitemap not being indexed by Google — full SSR + sitemap fix.

My sitemap isn't working — Google Search Console shows "Couldn't fetch" or
"Invalid XML" and my pages aren't being indexed. Please apply the full sitemap fix:

1) Strip BOM and leading whitespace from every sitemap file
   - The very first byte of every .xml file MUST be `<` (no BOM \uFEFF, no
     newlines, no spaces before `<?xml`).
   - Add a withoutLeadingWhitespace() helper that does
     .replace(/^\uFEFF/, "").replace(/^\s+/, "") and use it for every sitemap write.
   - Add a sanitizeGeneratedSitemaps() sweep...

How it works

01

Buy the prompt

£2.99 one-time. Secure checkout, no account needed.

02

Unlock on this page

The full prompt appears right here after payment.

03

Paste into your AI builder

Lovable, Replit or Base44 — paste, run, indexed.

Ready to get indexed?

£2.99 · charged as £2.99 GBP · instant unlock

Stripe secure checkout

Free sitemap & robots.txt tester

Paste your live URL — we'll fetch it the way Googlebot does and tell you exactly why it's failing (BOM, wrong Content-Type, HTML wrapper, redirect, 404, missing <urlset>).

Resubmit in Google Search Console (3 steps)

  1. 1. Open Search Console → Sitemaps and remove any broken sitemap entries.
  2. 2. Apply the prompt, redeploy, then re-run the tester above to confirm the file is valid.
  3. 3. Add sitemap.xml back in Search Console. The "Couldn't fetch" status usually clears within minutes.
Per-platform template

Canonical & meta tag template — copy-paste into Lovable

Fill in your details, then copy the snippet or download it as a ready-to-use file.

FILEsrc/routes/__root.tsx (inside head: () => ({ meta: [...] }))

Lovable uses TanStack Start. Edit the root route's head() — do NOT add raw <meta> tags inside JSX, they will be stripped during SSR.

// src/routes/__root.tsx
import { createRootRoute, HeadContent, Outlet, Scripts } from "@tanstack/react-router";

export const Route = createRootRoute({
  head: () => ({
    meta: [
      { charSet: "utf-8" },
      { name: "viewport", content: "width=device-width, initial-scale=1" },
      { title: "Your site title — under 60 chars" },
      { name: "description", content: "Your meta description — under 160 chars, keyword-rich." },
      { name: "robots", content: "index, follow, max-image-preview:large" },
      { property: "og:type", content: "website" },
      { property: "og:url", content: "https://yoursite.com" },
      { property: "og:title", content: "Your site title — under 60 chars" },
      { property: "og:description", content: "Your meta description — under 160 chars, keyword-rich." },
      { property: "og:image", content: "https://yoursite.com/og-cover.jpg" },
      { property: "og:image:width", content: "1200" },
      { property: "og:image:height", content: "630" },
      { name: "twitter:card", content: "summary_large_image" },
      { name: "twitter:title", content: "Your site title — under 60 chars" },
      { name: "twitter:description", content: "Your meta description — under 160 chars, keyword-rich." },
      { name: "twitter:image", content: "https://yoursite.com/og-cover.jpg" },
    ],
    links: [{ rel: "canonical", href: "https://yoursite.com" }],
  }),
});
Free tool

Indexing status checker

We fetch the page like Googlebot and report status, robots directives, canonical, title, description and OG tags — every reason a page might not be indexed.

Multi-platform review

Sitemap review (Lovable · Replit · Base44)

A deeper audit than the tester — scores your sitemap on the same checks Google's parser runs, counts URLs, and previews the first entries. Works on any platform.

How to fix your sitemap on Lovable, Replit and Base44

The same three bugs break Google indexing across every AI website builder. Here's what's actually happening — and the one prompt that fixes it.

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

  1. Open /sitemap.xml in your deployed preview and View Source — byte 1 must be <.
  2. Confirm dist/sitemap.xml exists after build (not just public/).
  3. Check robots.txt points at the absolute sitemap URL on your live domain.
  4. Make sure the response is application/xml, not text/html.
  5. 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.

Submit & monitor in Google Search Console

A platform-specific walkthrough for Lovable — plus a troubleshooting checklist for "Couldn't fetch", "Invalid XML", and indexing delays.

1. Verify your domain

  1. a. Open Search Console and add a URL prefix property.
  2. b. Use your full https://yourapp.lovable.app URL (or custom domain). Choose the HTML tag method and paste it into your root route's head() meta array.
  3. c. Redeploy, then click Verify in Search Console.

2. Submit your sitemap

  1. a. In Search Console, go to Sitemaps.
  2. b. Enter sitemap.xml and click Submit.
  3. c. If you use a sitemap index, Google auto-discovers the child sitemaps — no need to submit each one.
  4. d. On Lovable, run Publish after applying the prompt so the fixed /dist/sitemap.xml reaches your *.lovable.app domain.

3. Request indexing

  1. a. Open URL Inspection and paste your homepage URL.
  2. b. Click Request Indexing. Repeat for your top 5–10 pages.
  3. c. Use Test Live URL to confirm Googlebot can render the page.

4. Monitor weekly

  1. a. Check Sitemaps status — Success = good. Couldn't fetch = re-run the tester above.
  2. b. Check PagesWhy pages aren't indexed.
  3. c. Check Performance for impressions — first signals usually appear within 3–7 days.

Troubleshooting checklist

"Couldn't fetch" (sitemap)

  • • Open /sitemap.xml in an incognito tab — does it return 200?
  • • View source: byte 1 must be <. No BOM, no whitespace.
  • • Confirm Content-Type is application/xml, not text/html.
  • • Make sure robots.txt doesn't disallow /sitemap.xml.
  • • In Search Console, remove the broken entry, redeploy with the fix, then re-submit.

"Invalid XML" / "Sitemap could not be read"

  • • Hidden BOM (\uFEFF) at byte 0 — strip it on every write.
  • • HTML wrapper around XML — your SSR is returning the app shell. Add a server route that responds before the SPA fallback.
  • • Unescaped & or < inside <loc> URLs — run every URL through an XML escape helper.
  • • "Premature end of file" — generation runs after Vite's final transform; move it to writeBundle.

Indexing delays ("Discovered — currently not indexed")

  • • Confirm the sitemap is healthy first — Google won't trust your canonical URLs otherwise.
  • • Add internal links from your homepage to every page you want indexed.
  • • Each page needs a unique <title>, meta description, and canonical tag.
  • • Use URL Inspection → Request Indexing for high-priority pages.
  • • Thin or new domains often wait 1–4 weeks for first index.

"Crawled — currently not indexed"

  • • Quality signal — Google fetched the page but chose not to index it.
  • • Add unique, substantive content (300+ meaningful words), original images, and outbound references.
  • • Remove duplicate / near-duplicate pages, or set canonicals to consolidate them.

Frequently asked questions