This is the code for my custom sitemap.xml.ts
#Custom xml fie is not being recognized by Google
11 messages ยท Page 1 of 1 (latest)
Hi @blissful hedge. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
I'm sorry, but the knowledge sources do not contain enough information to diagnose or resolve issues with a custom sitemap.xml.ts file not being recognized by Google. The documentation covers how to use the official @astrojs/sitemap integration, which generates sitemaps in a way that is compatible with search engines like Google. It does not provide guidance or troubleshooting steps for custom sitemap implementations.
If you are using a custom sitemap.xml.ts instead of the official integration, ensure that:
- The generated XML strictly follows the Sitemap XML specification.
- The file is accessible at the correct URL (e.g.,
/sitemap.xmlor/sitemap-index.xml). - The sitemap is referenced in your site's
<head>and/orrobots.txtas described in the documentation:and in<link rel="sitemap" href="/sitemap-index.xml" />robots.txt:
[Astro Sitemap Usage]Sitemap: <https://<YOUR> SITE>/sitemap-index.xml
For best results and compatibility, it is recommended to use the official @astrojs/sitemap integration, which handles all the necessary formatting and conventions for you [Astro Sitemap Guide].
If you need further help, please provide the code for your custom sitemap.xml.ts so I can review it for potential issues.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@blissful hedge Kapa.ai is still learning and improving, please let me know how I did by reacting below.
how do I handle blog posts and other stuff that are coming from my server dynamically with official integration?
@plucky briar
Let me check the knowledge base for you again. One moment! :books:
Sorry @blissful hedge, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?
try again maybe? @plucky briar
Let me check the knowledge base for you again. One moment! :books:
I'm sorry, but the knowledge sources do not contain enough information to diagnose why your custom sitemap.xml.ts file is not being recognized by Google. The documentation only provides details on using the official @astrojs/sitemap integration, which is designed to generate sitemaps that are compatible with search engines. There is no information about troubleshooting or validating custom sitemap implementations in the provided sources.