Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

AEM Dispatcher considers sitemap as vanity URL

Avatar

Level 2

We have sitemap configured as 

/en/sitemap.xml

This is working as expected in the publisher. However while accessing from dispatcher, see the following the dispatcher log

Unable to fetch vanity URLs from [ip-address]:4503/libs/granite/dispatcher/content/vanityUrls.html: remote server returned: HTTP/1.1 404 Not Found

[Thu Sep 10 21:37:51 2020] [I] [pid 79557] "GET /[path-to-en]/en/sitemap.xml" ! - 9ms [publishfarm/-]



It seems like the sitemap is treated as vanity URL. Any thoughts on how to prevent this?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@tatvam thank you for helping the community grow. Are you using Vanity URLs in your project?

 

If yes you have to enable access to Vanity URL via dispatcher by following below helps Adobe doc:

https://docs.adobe.com/content/help/en/experience-manager-dispatcher/using/configuring/dispatcher-co...

 

If you project/client not using or planning to use AEM Vanity URL then simply remove that section from publish farm.

 

When you enable this Vanity urls in dispatcher (yes in most cases) dispatcher will periodically checks the Vanity service hosted in aem publishers to get latest vanities and will apply to incoming requests. It is an expected behavior.

 

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

@tatvam thank you for helping the community grow. Are you using Vanity URLs in your project?

 

If yes you have to enable access to Vanity URL via dispatcher by following below helps Adobe doc:

https://docs.adobe.com/content/help/en/experience-manager-dispatcher/using/configuring/dispatcher-co...

 

If you project/client not using or planning to use AEM Vanity URL then simply remove that section from publish farm.

 

When you enable this Vanity urls in dispatcher (yes in most cases) dispatcher will periodically checks the Vanity service hosted in aem publishers to get latest vanities and will apply to incoming requests. It is an expected behavior.

 

Avatar

Level 2
@sashi_mulugu does dispatcher treat xml extensions as vanity URLs? All other URLs are not treated like this and are getting rendered fine.

Avatar

Community Advisor
@tatvam, if you refer to documentation, it says, When access to vanity URLs is enabled, Dispatcher periodically calls a service that runs on the render instance to obtain a list of vanity URLs. Dispatcher stores this list in a local file. When a request for a page is denied due to a filter in the /filter section, Dispatcher consults the list of vanity URLs. If the denied URL is on the list, Dispatcher allows access to the vanity URL.

Avatar

Community Advisor
So it could be coincidence that when you request sitemap.xml , at same dispatcher might have called this service or you might have filter for either sitemap or xxl extensions in dispatcher which is forcing dispatcher to check for vanity service everytime

Avatar

Level 2

Found the answer, but it took a while dealing with environments with restrictive permissions.
1) The dispatcher filter rules were correct. 
2) No need to remove the vanity URLs section
3) Found that the DNS routed the traffic to a different vhost in this multi-vhost environment
4) And this routed the traffic subsequently to wrong dispatcher farm.

 

In short, dispatcher behaved correctly as expected - meaning it got a 404 in filters and thus routed to vanity URLs - just that it happened in the wrong dispatcher farm.