Several factors could potentially cause your sitemap not to be indexed:
Incorrect Sitemap Format: Your sitemap must follow the protocol defined by search engines. If it's incorrectly formatted or contains errors, search engines will struggle to read and index it.
Robots.txt Blockage: The robots.txt file may be set up in a way that prevents search engine bots from accessing and indexing your sitemap.
HTTP Errors: Any server-side issues like 4xx or 5xx errors can obstruct the accessibility of your sitemap to search engines.
Sitemap URL Not Added to Robots.txt or Search Console: If you didn't add your sitemap URL in the robots.txt file or directly submit it in the Google Search Console, search engines might not be aware of its existence.
Website Issues: If your website is facing issues such as slow loading speed, poor structure, or having many broken links, this can also impact the indexing of your sitemap.
To fix the issue of your sitemap not being indexed, consider the following solutions:
Verify Sitemap Format: Ensure that your sitemap is properly formatted according to the sitemap protocol. You can use online sitemap validators to check for any formatting errors.
Check Robots.txt: Make sure that your robots.txt file isn’t blocking search engines from accessing your sitemap. If necessary, exclude the sitemap URL from the disallow rules.
Audit for HTTP Errors: Inspect your server logs for any server errors that might prevent the access of your sitemap. Correct these errors as necessary.
Submit Sitemap to Search Console: Ensure that the URL of your sitemap is submitted in the Google Search Console. Also, add the sitemap link in the robots.txt file.
Optimize Your Website: Improve your website’s performance by enhancing its structure, fixing broken links, and optimizing its loading speed.