Technical
Warning

Sitemap lists URLs on a different domain

This error appears when your sitemap lists URLs that are on a different domain or subdomain from the file itself. Here's what it means and how to make sure the sitemap only includes your site's URLs.

What this error means

The sitemap is the file you use to tell Google which pages on your site you want it to crawl. The sitemaps protocol states that all its URLs must start the same way as the file's address, with the same domain and the same protocol, http or https. Ruk Audit compares the domain of each URL in the sitemap with the file's domain and flags the ones on another domain or on a subdomain, such as blog.yourdomain.com in a sitemap for yourdomain.com. If the sitemap redirects, it uses the domain of the final address as the reference. Differences in www or between http and https don't trigger this warning. Search engines discard the URLs that don't follow the rule and read the rest of the file normally. In Google Search Console you'll see it as the error "URL not allowed". Ruk Audit only checks the address of each page in the sitemap, so alternate language versions declared with hreflang and images hosted on an external service aren't covered by the warning. Google also accepts a single sitemap with URLs from several of your websites if you've verified all the domains in Search Console. In that case the warning will keep showing up and you can leave it as it is. This error usually shows up when the website address is set up wrong in the CMS, for example a WordPress site that still uses the address of the staging site. It also happens after changing domains without regenerating the sitemap, or when subdomains are included in the main domain's sitemap.

Why fixing URLs from another domain in the sitemap matters

Google doesn't use the sitemap for the URLs it discards. On top of that, if URLs from another domain show up, your website most likely doesn't have its main address clearly defined, the version you want Google to show.

Impact on SEO rankings

If the whole sitemap uses another domain, for example the staging site's, it has no effect on any of your pages. If Google takes longer to discover a page, it also takes longer to rank it and bring you visits.

Crawling and indexing obstacles

Without the sitemap, Google can only find the discarded pages by following internal links. Pages that get few links from the rest of your website can go a long time without being crawled or indexed.

Negative signals for site quality

If the sitemap uses one domain and the redirects or canonical tags use another, Google gets contradictory signals about your main address and may end up showing the one you don't want in search results.

How to fix it step by step

If this error showed up in your audit, here are the steps to leave it behind.

Step 1

Identify which URLs point to another domain

In the "Cross-domain URLs" column, Ruk Audit shows you the sitemap URLs that are on a different domain or subdomain from the file. Compare them with the sitemap's address and check whether the whole domain changes or just the subdomain.

Step 2

Fix the website address in your CMS

Check that the address your CMS uses matches your main address. In WordPress it's under Settings > General, in the WordPress Address (URL) and Site Address (URL) fields. SEO plugins like Yoast or Rank Math generate the sitemap automatically, so fixing the address is enough. If your sitemap is a static file, generate it again with the tool that created it.

Step 3

Move each URL to its own sitemap and unify the redirects

If there are still URLs from one of your subdomains that you do want indexed, include them in that subdomain's own sitemap. Then type your website into the browser with and without www, and with http and https. All four versions should take you to the same main address.

Step 4

Submit the corrected sitemap to Google Search Console

Once the changes are in place, clear your website's cache if you use one, so the new sitemap is served. Then submit it from Google Search Console so Google processes it again with the correct URLs.

Does your site have this problem?

Audit your website for free and discover if this and other SEO errors are affecting your ranking.

Get a free audit. Over 3033 reports delivered.
Hey, wait a moment
To analyze a website, you first need to create an account in the application. Click the button below to go to the registration screen.
Create account