Hi AEM Community
I have the following scenario
Brief description:
Customer has AEM as a Cloud Service with multiple subdomains configured.
The sitemap feature is enabled and also a customized class (MySiteMap.java) that extend the ResourceTreeSitemapGenerator abstract class from Sling.
One of the responsibility of the MySiteMap.java class is to remove the www. from the subdomains via code through custom regular expression
Customer has the following domain and subdomains configure:
1 - www.mycompany.com
2 - ensurance.mycompany.com
3 - supplychain.mycompany.com
Problem:
When the sitemaps are generated for these multiple domains the output produced is the following
for: 1 - www.mycompany.com
for: 2 - ensurance.mycompany.com
for: 3 -supplychain.mycompany.com
Views
Replies
Total Likes
Hi,
Do you have those url in link externalizer configuration or in etc/map?
https://experienceleague.adobe.com/docs/experience-manager-learn/sites/seo/sitemaps.html?lang=en
Hi arunpatidar
I have 2 questions though
1 -
You think if configure a regular expression to remove the www. for the 2 subdomains mentioned previously for /etc/map/ensurance.mycompany.com and /etc/map/supplychain.mycompany.com would resolve the issue on the sitemap generated ? printing our the expected
for: 2 - ensurance.mycompany.com
for: 3 -supplychain.mycompany.com
Hi,
I believe its is coming from some configuration, can you check if your implementation adding those
example
@_Clodo_ Did you find the suggestions from Arun helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Hi @arunpatidar
Here is the structure of the /etc/map from the scenario described previously.
/etc/map
/etc/map/www.mycompany.com
------>sling:match = (.+)$
/etc/map/ensurance.mycompany.com
------>sling:match = (.+)$
/etc/map/supplychain.mycompany.com
------>sling:match = (.+)$
Hi kautuk_sahni yes I found helpful, however still have doubts
Not Tried, but can you try:
To remove the "www." from subdomain URLs, you can configure "Apache Sling Sitemap - Site Configuration" OSGi configuration to use a different hostname for each subdomain:
ensurance.mycompany.com = https://ensurance.mycompany.com
supplychain.mycompany.com = https://supplychain.mycompany.com
Reference link: https://www.theaemmaven.com/post/aem-apache-sling-sitemap Or https://www.tothenew.com/blog/exploring-apache-sling-sitemap-generator-with-customization-in-aem/ Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies