Hi all,
Currently have the OOTB sitemap generator set up via Apache Sitemap Generator but noticed the xml is formatting in plain text on the page. The sitemap does pass validation.
Despite this, there is a need for us to fix the formatting to a proper xml page and wanted to see if there were possibly any workarounds in manually adjusting how the xml files are formatted outside of creating a custom sitemap generator.
Thank you.
Solved! Go to Solution.
Views
Replies
Total Likes
Please follow the steps mentioned below to fix readability issue in sitemap
Go to config manager (https://localhost:4502/system/console/configMgr) and search for Adobe AEM SEO - Page Tree Sitemap Generator (com.adobe.aem.wcm.seo.impl.sitemap.PageTreeSitemapGeneratorImpl).
Open the config and uncheck Add Language Alternates.
Note - If enabled, a page’s language copies will be added as language alternates to the URL entry (enableLanguageAlternates).
Save settings.
Verify the use case.
https://experienceleague.adobe.com/en/docs/experience-cloud-kcs/kbarticles/ka-21789
Hi @asdasdsa ,
What is the "Content-Type" response header being send when you hit the sitemap URL ? It should be set to application/xml then it should render correctly in browser also.
Thanks,
Somen
Ah, I see. I'm noticing that these specific sitemaps are not showing the content type. Would there be a reason for why the content type does not correctly set for these specific sitemaps? They are all generated through the OOTB generator
Please follow the steps mentioned below to fix readability issue in sitemap
Go to config manager (https://localhost:4502/system/console/configMgr) and search for Adobe AEM SEO - Page Tree Sitemap Generator (com.adobe.aem.wcm.seo.impl.sitemap.PageTreeSitemapGeneratorImpl).
Open the config and uncheck Add Language Alternates.
Note - If enabled, a page’s language copies will be added as language alternates to the URL entry (enableLanguageAlternates).
Save settings.
Verify the use case.
https://experienceleague.adobe.com/en/docs/experience-cloud-kcs/kbarticles/ka-21789
Thank you! I'm seeing it work perfectly. Curious, is there a reason this particular behavior exists with the language alternate config?
Hi,
This is due to a bug in Sling that hasn't been addressed yet. AEM relies on the Out-Of-The-Box (OOTB) Sling Sitemap Generation, which is likely where the problem originates.
"Content-Type" response header being send as html e.g.
Content-Type: text/html;
As suggested by @somen-sarkar , It should be set to application/xml then it should render correctly in browser also. You can change this from dispatcher.
Please also check option to use visual sitemap
@asdasdsa Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies