Remove URLs from other domains in the sitemap
Why it matters
A sitemap should list only URLs on its own site, and entries on another domain are ignored by search engines. This usually means a staging or old domain is still set as the site address.
The fix
- Find which domain the offsite URLs use, and where the generator takes its base URL from (a setting, an environment variable, a config file).
- Set the base URL to https://example.com and regenerate the sitemap. Sitemaps on one host may list another domain only if you control both and have verified them in Search Console, which is rarely what you want.
The examples use example.com. Replace it with your own domain.
Related
- Reported by the robots.txt and sitemap check
- Add a robots.txt file
- Fix the server error on robots.txt
- Fix the syntax of robots.txt
- Shrink the robots.txt file
- Allow search engines in robots.txt
- Publish an XML sitemap
- List the sitemap in robots.txt
- Make the sitemap reachable
- Fix the sitemap format
- Put URLs into the sitemap
- Split the sitemap into several files
Scan your domain to see whether this applies to you.