webzod
account

Fix the sitemap format on WordPress

hygiene.sitemap.invalid · effort: about an hour

Why it matters

The sitemap file cannot be read as a valid sitemap, so search engines will ignore it. The usual causes are an html page returned instead of the file, broken xml, or a wrong encoding.

The fix

  1. A common cause is a PHP notice or stray whitespace printed before the xml by a plugin or theme. Turn off WP_DEBUG_DISPLAY and look in the plugin or theme for text printed outside functions.
  2. Deactivate sitemap and SEO plugins one at a time to find the one that breaks the output, and use only one sitemap source.

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.