List the sitemap in robots.txt on WordPress
Why it matters
A sitemap exists at /sitemap.xml but robots.txt does not mention it, so crawlers that do not already know about it will not find it. Adding the line takes a minute.
The fix
- The core sitemap at /wp-sitemap.xml is listed in WordPress's own robots.txt automatically. If a physical robots.txt or an SEO plugin replaces it, add the Sitemap line there.
- Check https://example.com/robots.txt afterwards.
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
- Make the sitemap reachable
- Fix the sitemap format
- Put URLs into the sitemap
- Split the sitemap into several files
- Remove URLs from other domains in the sitemap
Scan your domain to see whether this applies to you.