Technical
Warning

Sitemap declared on a different domain

This error appears when the Sitemap line in your robots.txt points to a sitemap hosted on another domain or subdomain. It may be your own decision, such as hosting the sitemap on a CDN, or a leftover from a migration that needs fixing.

What this error means

The robots.txt file accepts a Sitemap line with the full address of your sitemap. Ruk Audit checks each of those lines and compares the sitemap's domain with that of the website where the robots.txt is. If they don't match, this warning is triggered, and in the table you'll see your robots.txt URL next to the URLs declared on an external domain. The comparison ignores www, so www.yourdomain.com and yourdomain.com are the same website, and it doesn't check whether the address starts with http or https either. A subdomain is treated as a different domain, so a sitemap on cdn.yourdomain.com declared from yourdomain.com also triggers the warning. Having the sitemap outside your domain, for example on a CDN, is allowed. Google and Bing accept it because the line in your robots.txt proves the website is yours, and they only ask that the sitemap contain URLs from your website. That's why Ruk Audit only flags it as a warning. This error usually shows up when the line still points to the old domain after a migration, when a website with one domain per language declares the main domain's sitemap on each of them, or when a robots.txt copied from another website was uploaded.

Why reviewing a sitemap declared on a different domain matters

If the external sitemap is yours and lists your pages, everything is in order. The problem comes when the line is a leftover from another setup and points to a file that describes another website.

Impact on SEO rankings

The sitemap helps search engines find your pages, not rank them higher, so the effect on your positions is indirect. Where you notice it is with new content, which takes longer to appear if the search engine doesn't have a reliable sitemap of your website.

Crawling and indexing obstacles

If the line points to an old domain or to another website, search engines and SEO tools that read your robots.txt run into a domain that doesn't respond or into another website's pages, and they only reach yours by following your internal links. Google will only have your sitemap if you've submitted it from Search Console.

Negative signals for site quality

A line that points to the previous domain usually signals a migration that was left half done. It's likely that internal links or images with the old address remain too, and each one leads search engines to a redirect or to a page that no longer exists.

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

Open the sitemap that Ruk Audit flags as external

In the warning's table you have the URL of the sitemap that's on another domain. Open it in your browser and look at the domain of the URLs it lists. If they're from your website and the sitemap is hosted elsewhere on purpose, just confirm that it opens without errors and you can leave it as it is, even if the warning keeps showing up.

Step 2

Fix the Sitemap line if it's a mistake

If the URLs belong to another website or the domain is no longer yours, change the line so it points to the sitemap on your own domain, with the full address. For example, the line "Sitemap: https://old-domain.com/sitemap_index.xml" becomes "Sitemap: https://yourdomain.com/sitemap_index.xml". In WordPress, the robots.txt is usually generated by the SEO plugin. With Yoast it's edited in Tools > File editor and with Rank Math, in Edit robots.txt in its General Settings. If Rank Math doesn't let you edit it, there's usually a robots.txt uploaded by hand to your website's main folder, and that one is changed from your hosting. If the editor doesn't appear in Yoast, file editing is disabled in your WordPress and you'll also need to do it from your hosting. If you're coming from a migration, the old domain usually remains in links and images too. A plugin like Better Search Replace changes it to the new one across all the content in the database in one go, although it doesn't touch the theme files. Make a backup before using it.

Step 3

Check the published robots.txt

Go to yourdomain.com/robots.txt in your browser and confirm that the new line appears. Copy the URL from that line and open it to make sure the sitemap loads and that the addresses it contains are from your website.

Step 4

Submit the correct sitemap to Google Search Console

In the Sitemaps report, submit the sitemap for your domain and remove the old one if you had it registered. If you've fixed the line, run the audit in Ruk Audit again to confirm that the warning has disappeared.

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 3022 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