In short
Ahrefs flags "Sitemap in the wrong format" when a file declared as a sitemap isn't in a supported format. Google accepts XML, RSS or Atom feeds, and plain text files with one URL per line. Common mistakes are pointing robots.txt at an HTML sitemap page, a redirect to the home page, or an error page returned with status 200. Point to the real XML sitemap.
A sitemap must be in a format search engines can parse. An HTML page full of links isn't one.
Common causes
| Cause | Fix |
|---|---|
| robots.txt points to an HTML "sitemap" page | Point it to the XML sitemap |
| Old sitemap URL now shows a 404 page with status 200 | Update the URL; fix the soft 404 |
| Single-page app serves index.html for /sitemap.xml | Exclude the sitemap path from the app's fallback rule |
| Compressed file served without gzip handling | Serve it uncompressed, or correctly as .gz |
The third cause is common on single-page apps: the server's catch-all rule returns the app's HTML for any path, including /sitemap.xml. Make sure the real file is served before the fallback.
HTML sitemaps are still fine for people
A page listing your main pages can help visitors and internal linking. Just don't declare it as your sitemap; keep the XML one for search engines.
This guide isn't affiliated with or endorsed by Ahrefs.
Related issues
Sources and references
Google Search Central, Build and submit a sitemap

About the author
Nazmul Nikhil
Head of SEO & Assistant Manager, Digital Marketing at Notionhive
SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.



