sitemap showing text content | Community
Skip to main content
Balu_M
Level 3
June 7, 2022
Solved

sitemap showing text content

  • June 7, 2022
  • 2 replies
  • 1454 views

Hi,

 

We are using AEM core component sitemap feature as suggested in below Url,But we are getting plain text when we access sitemap xml.,

 

When we inspect network then response coming with xml tags but while rendering those tags are getting removed.

https://experienceleague.adobe.com/docs/experience-manager-learn/sites/seo/sitemaps.html?lang=en

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

You may be expecting the mimetype to view xml as response 

 

content-type:text/xml

 

But application/xml is recommended as of RFC 7303 (section 4.1), but text/xml is still used sometimes. You can assign a specific MIME type to a file with .xml extension depending on how its contents are meant to be interpreted. For instance, an Atom feed is application/atom+xml, but application/xml serves as a valid default.

2 replies

SantoshSai
Community Advisor
Community Advisor
June 7, 2022

Hi @balu_m ,

I am experiencing similar issue - It's breaking xml and found it's known issue - for more details please check here: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/apache-sling-sitemap-for-aem-6-5-11-and-aemaacs-aem-community/m-p/448661/highlight/true#M32726 

Check this public wknd site: https://wknd.site/us/en.sitemap.xml 

@kautuk_sahni 

Regards,
Santosh

Santosh Sai
arunpatidar
Community Advisor
Community Advisor
June 8, 2022

Hi,

can you check

1. the view source

2. Response type from Network tab

3. also try in another browser.

I have seen this kind of issue reported here before but the actual response from sitemap was xml but displaying the text from xml nodes

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-sling-sitemap-generator/m-p/448662#M128473 

Arun Patidar
Balu_M
Balu_MAuthor
Level 3
June 8, 2022

Hi @arunpatidar ,

 

I can see view source consist of XML data and response type application/xml.

Is this not issue when search engine trying to access sitemap content ?

 

 

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
June 8, 2022

You may be expecting the mimetype to view xml as response 

 

content-type:text/xml

 

But application/xml is recommended as of RFC 7303 (section 4.1), but text/xml is still used sometimes. You can assign a specific MIME type to a file with .xml extension depending on how its contents are meant to be interpreted. For instance, an Atom feed is application/atom+xml, but application/xml serves as a valid default.

Arun Patidar