The Bug
I have 8 niche tool sites built with AI. Yesterday I found 5 of them had [object Object] and undefined in their sitemap XML.
Root Cause
// BAD: concatenating object instead of property
const url = `https://site.com/${page}`;
// = https://site.com/[object Object]
// GOOD:
const url = `https://site.com/${page.slug}`;
Check Yours
curl -s https://yoursite.com/sitemap.xml | grep -E "object Object|undefined|null"
Fixed all 8 sites. Full rebuild + redeploy. Now tracking at livephotokit.com.
Top comments (0)