Next.js Discord

Discord Forum

Google Search Console says “Couldn’t fetch” for my Next.js sitemap

Unanswered
Staffordshire Bull Terrier posted this in #help-forum
Open in Discord
Staffordshire Bull TerrierOP
I’m stuck on an issue with my Next.js sitemap and can’t figure out what’s causing it.

I set up a sitemap.ts and added all of my pages. The sitemap is live and opens fine in the browser, but every time I submit it to Google Search Console, it says “Couldn’t fetch”.

Here’s what I’ve already tried:

- Made sure the sitemap is publicly accessible.
- Checked that Cloudflare isn’t blocking anything.
- Confirmed I’m submitting the correct sitemap URL.
- Waited over a week and submitted it again.
- Resubmitted it a few more times, but I keep getting the same error.

I’m out of ideas at this point. Has anyone run into this before or know what could be causing it?

If it helps, I can share my sitemap.ts, robots.txt, and the sitemap URL.

3 Replies

Staffordshire Bull TerrierOP
Hmm you can live test your url via google search console. Then it uses google servers to get the Sitemap. For that navigate to “url inspection” and run it there. It gives you plenty of details on what happens on serverside (from google) and why it couldn’t fetch. Or if everything worked then we can check further

Btw, you robots also not explicitly allowing the google bot to crawl. And also Cloudflare might not allow the google bot to crawl (during Cloudflare setup you are asked if you want to allow crawlers. It’s by default denied, so it happens very fast that crawlers are blocked)