The Silent Sitemap Bug That Blocked Google From Indexing My Sites

작성자

카테고리:

← 피드로
DEV Community · gan liu · 2026-07-02 개발(SW)

gan liu

When I checked Google Search Console after a month, only 2 of my 8 sites were indexed. The other 6 had zero pages in Google’s eyes. No penalty, no error banner. Just silence.

The bug

My build script generated the sitemap by mapping over page objects. Somewhere a URL field was an object, not a string. So the sitemap shipped lines like:

<url><loc>https://example.com/[object Object]</loc></url>

Enter fullscreen mode Exit fullscreen mode

Google fetched the sitemap, saw garbage URLs, and quietly skipped the whole file. No crawl, no index.

How I caught it

  1. GSC > Sitemaps > it said “Success” but “Discovered pages: 0”. That mismatch is the tell.
  2. I opened the raw sitemap.xml in the browser and searched for [object. There it was.
  3. Root cause: url: page.url where page.url was itself { path, params }, not a string.

The fix

// before
loc: page.url            // -> [object Object]
// after
loc: `https://livephotokit.com${page.path}`

Enter fullscreen mode Exit fullscreen mode

Redeployed, resubmitted the sitemap, and requested indexing on the core pages. Pages started landing in the index within a couple of days.

Takeaway

A “Success” status on your sitemap does not mean Google read your URLs. Always open the raw XML and eyeball it. One bad [object Object] can silently sink an entire site.

I’m building LivePhotoKit and a handful of other small tools solo with AI. Sharing the real bugs as I hit them.

원문에서 계속 ↗

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다