Guide ยท Google Search ยท Updated
Search Console Says "Sitemap Is HTML" or "Couldn't Fetch"? Fix the sitemap.xml in Your Lovable, Bolt or v0 App
You launched your app, added it to Google Search Console, submitted /sitemap.xml, and got an error back. This is one of the most common launch problems for apps built with Lovable, Bolt, v0, Replit and Cursor. The good news: it is usually a missing file, and it takes a few minutes to fix. Here is what each message means, why it happens, how to fix it in your builder, and how to check it on your live site.
1. The quick answer
Open https://your-domain/sitemap.xml in your browser. If you see your app's home page, your app has no real sitemap file. Your app is set up to send its main page for any address it does not know, so Google gets a web page where it expected a sitemap. That is what "Sitemap is HTML" means.
The fix is to add a real sitemap.xml file with the full https:// address of each public page, publish, and resubmit it in Search Console. If the message is "Couldn't fetch", check your robots.txt and the exact URL first.
2. What each Search Console message means
You find these in Search Console under Indexing โ Sitemaps. Click a sitemap to see the details.
| Message | What it means | Common cause in vibe-coded apps |
|---|---|---|
| Couldn't fetch | Google could not get the file at all. | Blocked by robots.txt, wrong URL (404), server error. |
| Sitemap could not be read | The fetch failed. The details page says why, for example an HTTP error. | Same as above. Click the sitemap to see the reason. |
| Sitemap is HTML | The address sends a web page, not a sitemap file. | No real sitemap file, so the app sends index.html. |
| Has errors | Google read the file but found problems in it. | Relative URLs like /pricing, broken XML, wrong domain. |
| Success | Google read it. Your pages are queued for crawling. | Nothing to fix in the sitemap. |
For Couldn't fetch, Google lists these reasons: the sitemap is blocked by your robots.txt (Google respects robots.txt when it fetches sitemaps), the URL is wrong (a 404 error), the site has a manual action, a general server error, or low crawl demand. Google also says the report does not follow redirects for the URL you submit, and that it shows only sitemaps in the current property, so check that you are not mixing up http and https, or www and no www.
One more thing to know: a sitemap that says Success only means Google read your list. It does not promise that every page gets indexed.
Source: Google: Sitemaps report
3. Why vibe-coded apps send HTML for /sitemap.xml
Most apps from Lovable, Bolt and Replit are single-page apps built with Vite and React. There is one real page, index.html, and JavaScript draws every screen. So that links like /pricing work when someone opens them directly, the host has a catch-all rule that sends index.html for any address. Netlify's version looks like this:
/* /index.html 200If there is no real sitemap.xml file, that rule answers /sitemap.xml too, with status 200 and your home page. Google gets HTML and rejects it. Netlify says a file that actually exists is served instead of the rewrite (it calls this "shadowing"), so adding the real file fixes it without touching the rule.
Lovable's docs say it plainly: Lovable creates a robots.txt with every new project, "but not always a sitemap."
Next.js apps (common with v0 and Cursor) usually return a 404 for /sitemap.xml instead, unless you add app/sitemap.js or a sitemap.xml file. A 404 shows up as Couldn't fetch.
Other common mistakes
- Relative URLs. Google says to use full, absolute URLs. Write
https://yourapp.com/pricing, not/pricing. - Wrong domain. The sitemap lists your
.lovable.app,.vercel.appor.netlify.appaddress, but you added your custom domain to Search Console. - robots.txt blocks it. A leftover
Disallow: /from a test setup blocks the sitemap and every page. - Private pages in the list. Login, dashboard and admin pages do not belong in a sitemap.
- Not published. Google reads the sitemap from your live site, so a file that only exists in your editor does nothing.
Sources: Netlify: Rewrites and shadowing ยท Lovable: SEO and AI search ยท Google: Build and submit a sitemap
4. How to fix it in Lovable, Bolt, v0, Replit and Cursor
Lovable
Open your project's SEO and AI search review. Lovable says it checks your sitemap, robots.txt and indexing, and that it can fix most findings when you click Try to fix. You can also ask in chat for the Vite prompt below. Then publish and check the live URL.
Bolt, Replit and other Vite apps
Put the file in the public folder. Vite copies everything in public/ to the root of your built site as it is, so public/sitemap.xml is served at /sitemap.xml. A small sitemap looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://yourapp.com/</loc></url>
<url><loc>https://yourapp.com/pricing</loc></url>
</urlset>Then add this line to public/robots.txt (Google says it can go anywhere in the file):
Sitemap: https://yourapp.com/sitemap.xmlv0, Cursor and other Next.js apps
Next.js has a special app/sitemap.js (or .ts) file. It returns a list of pages, and Next.js serves it as XML at /sitemap.xml. Add app/robots.js the same way. If your app has middleware that sends signed-out visitors to a login page, make sure it skips these two addresses.
Google's size limit is 50,000 URLs or 50MB per sitemap file, which is far more than most launch-stage apps need.
Sources: Lovable: SEO and AI search ยท Vite: The public directory ยท Next.js: sitemap.xml ยท Google: Build and submit a sitemap
5. Check your live sitemap in 60 seconds
- Open it. Go to
https://your-domain/sitemap.xmlin a private window. Press Ctrl+U (Cmd+Option+U on Mac) to see the source. It should start with<?xmlor<urlset. If it starts with<!DOCTYPE html, it is your app page, not a sitemap. - Check the headers. In a terminal, run this. You want
200and an XML content type, nottext/html:curl -sI https://your-domain/sitemap.xml - Check robots.txt. Open
https://your-domain/robots.txt. There should be noDisallow: /underUser-agent: *, and there should be aSitemap:line with the full URL. If/robots.txtalso shows your app page, it is missing too. - Test it in Search Console. Paste the sitemap URL into the URL Inspection tool, click Live test, then resubmit it in Indexing โ Sitemaps. Google says that if a sitemap keeps failing, it eventually stops trying, so resubmit after you fix it.
Your page titles matter too. If Google shows "Lovable App" or "Vite + React", read why your app shows the wrong title in Google.
Source: Google: Sitemaps report
6. Copy-paste fix prompts
Paste the prompt for your builder into Lovable, Bolt, v0, Replit or Cursor. Replace DOMAIN with your live domain, like yourapp.com. Run the 60-second check again after you publish.
My live site sends its normal HTML page for /sitemap.xml, so Google Search Console says the sitemap is HTML. Create a real file at public/sitemap.xml in the Sitemaps XML format (<?xml version="1.0" encoding="UTF-8"?> and a <urlset> with one <url><loc> per page). List every public page using the full https:// URL on my live domain DOMAIN, for example https://DOMAIN/pricing, not /pricing. Do not list login, dashboard, admin or other private pages. Do not change my SPA fallback rewrite; a real file at that path should be served first. Then make sure public/robots.txt allows crawling and ends with "Sitemap: https://DOMAIN/sitemap.xml". Tell me how to check it after I publish.
Add a sitemap to this Next.js app router project using the metadata file convention: create app/sitemap.js (or .ts) that returns every public page with a full https:// URL on my live domain DOMAIN and a lastModified date. Also add app/robots.js that allows all crawlers on public pages and points to https://DOMAIN/sitemap.xml. Do not add private routes like /dashboard or /admin. Check that no middleware, auth redirect or rewrite catches /sitemap.xml or /robots.txt.
Google Search Console says it couldn't fetch my sitemap at https://DOMAIN/sitemap.xml. Check these and fix what you find: 1) robots.txt must not block /sitemap.xml or the whole site (no "Disallow: /" for User-agent: *). 2) /sitemap.xml must return HTTP 200 directly, not a redirect to a login page or the home page. 3) The sitemap must use the same domain I added in Search Console (same https, same www or no www). 4) No password protection, auth middleware or bot blocking on that path. Show me what you changed.
7. What VibeCheck checks for you
Paste your link into VibeCheck. It loads your live site from the outside, the way a stranger or a search engine would. For search, it checks:
- sitemap.xml: missing, sends an HTML page instead of a sitemap, has no
<urlset>or<sitemapindex>, or has no<loc>entries. - robots.txt: missing, or blocks every search engine with
Disallow: /. - Homepage basics: a
noindextag or header, a missing or starter title, a missing description, and broken links on your homepage.
In the same scan it also looks for the bigger risks: leaked API keys in the JavaScript your homepage loads, Supabase tables your public key can read, and missing security headers.
What it does not do: it does not log in to your Search Console, check every URL listed in your sitemap, or tell you which pages Google has indexed. Use Search Console for that. It never asks for your code or login.
Pricing: the problems list is free (just add your email). The $9 fix report gives you a copy-paste fix prompt for every problem found, or get the $29 10-pack. No subscription.
8. FAQ
Why does Search Console say my sitemap is HTML?
Because the address you gave Google sends back a normal web page, not a sitemap file. In most vibe-coded apps, /sitemap.xml does not exist as a file, so the app's catch-all rule sends your home page (index.html) instead. Add a real sitemap.xml file and check that the address shows XML that starts with <?xml or <urlset.
What does "Couldn't fetch" mean for a sitemap?
Google says it means Google could not get the sitemap file at all. Its listed reasons include: the sitemap is blocked by robots.txt, the URL is wrong (a 404 error), a manual action on the site, a general server error, or low crawl demand. Open the exact URL you submitted in a private window, then run a Live test in the URL Inspection tool.
Does Lovable create a sitemap for me?
Not always. Lovable says it creates a robots.txt with every new project, but not always a sitemap. Lovable's SEO and AI search review checks your sitemap and robots.txt and can fix most findings when you click Try to fix. Publish first, because Google reads the sitemap from your live site.
Where do I put sitemap.xml in a Vite app (Bolt, Replit, Lovable)?
In the public folder. Vite copies files from public/ to the root of your built site as they are, so public/sitemap.xml is served at /sitemap.xml. Use full https:// URLs inside it, and add a Sitemap: line to public/robots.txt.
Do I need a sitemap for Google to find my app?
Not strictly. Google can find pages by following links. But a sitemap helps Google find all your pages, and it is the easiest way to see in Search Console whether Google can read your list of pages. A broken sitemap gives you no benefit.
My sitemap says Success but my pages are not indexed. Why?
A sitemap is a list of pages you would like crawled. It does not force Google to index them. Check each page with URL Inspection, look for a noindex tag, and make sure each page has real content, a clear title and links from your other pages.
Does VibeCheck check my sitemap and robots.txt?
Yes. VibeCheck loads /sitemap.xml and /robots.txt on your live site. It flags a missing sitemap, one that returns an HTML page, one with no <urlset> or <sitemapindex>, and one with no <loc> entries. It also flags a missing robots.txt, a robots.txt that blocks every search engine with Disallow: /, and a noindex tag on your homepage. It does not read your Search Console account or test every URL inside the sitemap.
More questions? See the VibeCheck FAQ. Related guides: Not showing up on Google or ChatGPT? ยท 404 when you refresh? ยท Wrong title in Google? ยท Is my Lovable app safe? ยท Is my Bolt app secure? ยท Is my v0 app secure? ยท Vibe coding security checklist.