Search Console rejects a bare sitemap filename

1 min read SEO

Submitting sitemap.xml to a Search Console domain property fails or just won't take. A domain property wants the full absolute URL, not the filename.

TL;DR · THE FIX

In a Search Console domain property, the Sitemaps tool needs the full absolute URL (https://yourdomain/sitemap-index.xml), not a bare sitemap.xml. The filename-only form silently fails to register.

The symptom

I’d verified the site in Google Search Console as a domain property, generated a sitemap, and went to submit it. Typing sitemap-index.xml (or sitemap.xml) into the Sitemaps box either errored or sat there never registering. The sitemap itself was fine: fetching https://unstucked.dev/sitemap-index.xml in a browser returned valid XML.

What’s happening

A URL-prefix property pre-fills the origin for you, so you only type the filename and it works. A domain property spans the whole domain, all subdomains and both schemes, so it has no single prefix to prepend, and the Sitemaps tool expects an absolute URL. Give it a bare filename and it has nothing to resolve it against, so the submission doesn’t take.

The fix

Submit the full absolute URL:

https://unstucked.dev/sitemap-index.xml

It registers immediately, and within a day or two the report fills in with “Success” and the discovered-pages count. If you use the Astro sitemap integration, the index lives at /sitemap-index.xml rather than /sitemap.xml, so submit the index URL.

The lesson

In a Search Console domain property, submit the full sitemap URL rather than the filename. The filename-only shortcut works only for URL-prefix properties, where Google already knows the origin.

Related fixes

Discussion

Powered by GitHub. Sign in to leave a comment.