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 in AEM 6.5.13 not generating absolute URLs

Avatar

Level 2

Hi,

We are using the OOTB sitemap scheduler generation, and it's working as per the adobe tutorial, only problem is that our SEO team wants absolute URLs instead of the relative ones that we are getting:

https://mysite.net/content/mysite/mypage.sitemap.xml

<script/>
<url>
<loc>/content/mysite/mypage.html</loc>
</url>
</urlset>
what we want is:
<script/>
<url>
<loc>https://mysite.net/content/mysite/mypage.html</loc>
</url>
</urlset>
Also, is it possible to remove "/content" from the generation and just have the rewrite?
Any help would be appreciated!
Thanks
1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi @SamFlyn

You would have to implement the shortening of URL to remove the /content from the sitemap generation. This can be handle by the following ways:-

1. Using sling mapping by setting node definition under /etc/map/https

2. Using sling resource resolver rules. Using the web console (for example, localhost:4502/system/console/configMgr) you can configure the Sling Resource Resolver:

Apache Sling Resource Resolver Factory
(org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl).

Here are the some links that you can follow to implement the shortening of URL in the sitemap.

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/overview/seo-and-ur...

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

https://blog.3sharecorp.com/shortening-urls-in-aem

Hope this helps.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 9

Hi @SamFlyn

You would have to implement the shortening of URL to remove the /content from the sitemap generation. This can be handle by the following ways:-

1. Using sling mapping by setting node definition under /etc/map/https

2. Using sling resource resolver rules. Using the web console (for example, localhost:4502/system/console/configMgr) you can configure the Sling Resource Resolver:

Apache Sling Resource Resolver Factory
(org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl).

Here are the some links that you can follow to implement the shortening of URL in the sitemap.

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/overview/seo-and-ur...

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

https://blog.3sharecorp.com/shortening-urls-in-aem

Hope this helps.