Remove URLs from other domains in the sitemap on WordPress
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
- Open Settings, General and check WordPress Address and Site Address both use https://example.com. An old or staging address there leaks into every sitemap entry.
- Check your SEO plugin for a separate site URL setting, then clear caches and regenerate the sitemap.
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.