Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

sitemap showing text content

Avatar

Level 3

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

 

Balu_M_1-1654626604697.png

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.

View solution in original post

1 Reply

Avatar

Community Advisor

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-a... 

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

@kautuk_sahni 

Regards,
Santosh

Avatar

Community Advisor

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-generato... 

Avatar

Level 3

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 ?

 

Balu_M_0-1654676594455.pngBalu_M_1-1654676738917.png

 

Avatar

Correct answer by
Community Advisor

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.