In short
Ahrefs flags "Sitemap includes URLs out of its scope" when a sitemap lists URLs outside the folder or host it's located on. Under the sitemap protocol, a sitemap at example.com/blog/sitemap.xml can only list URLs under example.com/blog/, and one on www.example.com can't list example.com URLs. Put the sitemap at the site root, and make every URL in it match its protocol and host.
Where a sitemap lives decides which URLs it may list.
Examples
| Sitemap location | URL listed | In scope? |
|---|---|---|
| https://example.com/sitemap.xml | https://example.com/services/ | Yes |
| https://example.com/blog/sitemap.xml | https://example.com/services/ | No (outside /blog/) |
| https://www.example.com/sitemap.xml | https://example.com/page/ | No (different host) |
| https://example.com/sitemap.xml | http://example.com/page/ | No (different protocol) |
How to fix it
Move the sitemap to the site root, or list only URLs within its folder.
Make URLs match the site's preferred protocol and host. Most cases come from www versus non-www mismatches.
For several domains or subdomains, give each its own sitemap, or verify all of them in Search Console. Google accepts cross-site sitemaps when you've verified ownership of every site involved.
This guide isn't affiliated with or endorsed by Ahrefs.
Related issues
Sources and references
sitemaps.org, Sitemap file location
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.



