Skip to content
Nazmul Nikhil
Menu

Sitemap Includes URLs Out of Its Scope (Ahrefs): Location Rules Explained

A sitemap can only list URLs at or below its own location and host. Ahrefs flags URLs outside that scope. Here's the rule and how to fix it.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 1 min read
Sitemap Includes URLs Out of Its Scope (Ahrefs): Location Rules Explained
Photo: Beatriz Pérez Moya on Unsplash

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

  1. Move the sitemap to the site root, or list only URLs within its folder.

  2. Make URLs match the site's preferred protocol and host. Most cases come from www versus non-www mismatches.

  3. 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.

Sources and references

TAGSAhrefs Site AuditSitemap urls out of scopeSitemap location rulesCross-domain sitemap
Nazmul Nikhil

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.

Need help with this?

Get it fixed with Technical SEO

I find the issues that cost you traffic and fix them, starting with the pages that matter most.

Keep reading

Related articles

All Site Audit Issues posts →

Get the next guide in your inbox

One email when a new SEO or AI search guide goes live.

Ready to grow?

Get a free audit of your website, or book a 30-minute call to talk through your goals.

Nazmul Hasan

Talk to Nazmul directly

Reply within 24h

WhatsApp +880 1682835118
nazmulnikhil@gmail.com