In short
Ahrefs flags "4XX page in sitemap" for sitemap URLs that return a 4xx error, usually 404. Search engines spend crawl requests on dead pages, and a sitemap full of errors is a weaker guide. Restore the page, redirect it and list the new URL, or remove it from the sitemap. Then find out why it was listed, so it doesn't happen again.
Listing a page in your sitemap asks search engines to crawl and index it. Listing a page that doesn't exist wastes that request.
Common causes
| Cause | Fix |
|---|---|
| A static sitemap file that isn't updated | Switch to an automatic sitemap |
| Sitemap served from an old cache | Purge the plugin, server and CDN cache |
| Pages behind a login (401/403) included | Exclude private content types |
| Typos or old URL formats in a hand-built sitemap | Regenerate it |
How to fix it
WordPress: Yoast and Rank Math sitemaps update automatically. If dead URLs persist, a caching plugin may be serving an old copy; purge it. Also check for an old sitemap.xml file in the site root that overrides the plugin.
Shopify, Webflow and Wix: sitemaps are automatic. 404s usually disappear after the platform regenerates them; recheck after a recrawl.
Custom builds: generate the sitemap at build time from published content only.
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.



