Vanity URL working inconsistently



Hi All,


I am facing weird issue of Vanity url which works for some urls and does not for some of them.

The Urls are unique in the AEM application.

for Example: =>sling:vanityPath configured abc.html works when accessed

but another page: =>sling:vanityPath configured xyz.html does not works when accessed

We can see in the error log stating the resource doesn't exists.

Also sling resource resolver resolves the  page  but doesn't resolves the page


I have installed the vanity url component on the publish instance and have configured the dispatcher according to adobe documentations

Also used this link for the setup.


Has anyone faced this issue?


the problem looks to be how vanity url work along with dispatcher. The vanity url http://localhost:4503/xyz works fine directly on publisher

But the same page over dispatcher url  doesnt works, but having works fine. 


Attaching the error log response, the dispatcher vanity url( service response and the configured vanity url

04.08.2020 11:27:19.137 *INFO* [ [1596533239134] GET /xyz.html HTTP/1.1] service: Resource /content/site-A/xyz.html not found


Screenshot 2020-08-04 at 11.16.53.png









Screenshot 2020-08-04 at 11.29.55.png






vhost configuration:

<VirtualHost *:80>
Header set Host ""
<Directory /Users/subrato.kha/dispatcher-cache/site-A>
<IfModule disp_apache2.c>
SetHandler dispatcher-handler
ModMimeUsePathInfo On

Options FollowSymLinks
AllowOverride None

# Apache httpd 2.2
# Order allow,deny
# Allow from all

# Apache httpd 2.4
Require all granted
DocumentRoot "/Users/subrato.kha/dispatcher-cache/site-A"
ErrorLog "/private/var/log/apache2/"
CustomLog "/private/var/log/apache2/" common

# Rewrite rules for removing html from extension
# Handle requests to pages ending with a trailing slash
RewriteEngine on

RewriteCond %{REQUEST_URI} !^/content/dam
RewriteCond %{REQUEST_URI} .*/$
RewriteCond %{REQUEST_URI} !^/$
RewriteRule (.*)/$ $1.html [PT,L,QSA]
# Handle requests to pages ending without a trailing slash
RewriteCond %{REQUEST_URI} !^/content/dam/.*
RewriteCond %{REQUEST_URI} !.*\..*$
RewriteCond %{REQUEST_URI} !.*/$
RewriteRule (.*)$ $1.html [PT,L,QSA]

#redirect /file.html to /file
RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ /%1 [NE,L,R=301]

Accepted Solutions (1)

Accepted Solutions (1)




@subrato-kha in most cases it should be conflict between your rewrite rules in Apache for adding .html extension to url for supporting url shortening.  Can you please share your rewrite rules as well as logs in debug mode.

Also please refer to below community question for reference

Answers (2)

Answers (2)




Hi @subrato-kha,


  • Can you please share dispatcher logs.What are you getting in the logs when you are trying to access vanity-url-two.html
  • Is there any rewrite rule which is overwriting vanity-url-two.html to something else
  • Try to check if the problem is in the dispatcher or in publisher
  • Please check access.log in the publisher to check if the request is reaching publisher or not
  • If it is reaching publishers, check your anonymous user permissions






hi @subrato-kha,

Do you see the vanity URL which is failing in http://<aem-publish-host:port>/libs/granite/dispatcher/content/vanityUrls.html? This is the service that runs on publisher retrieves the list of vanity URLs available in publish.