Hi All,
The logs in AEM Dispatcher and HTTPD Access are flooded with GET /favicon.ico.
My favicon is present in clientlibs and rendering correctly as seen on the page's HTML -
<link rel="icon" type="image/png" href="/etc.clientlibs/brandA/clientlibs/clientlib-favicon/resources/favicon-brandA-180x180.png">
<link rel="icon" type="image/png" href="/etc.clientlibs/brandA/clientlibs/clientlib-favicon/resources/favicon-brandA-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/etc.clientlibs/brandA/clientlibs/clientlib-favicon/resources/favicon-brandA-192x192.png" sizes="192x192">
Query - How can I handle these requests which are currently going to 404 ?
Please find both the logs (Access and Request Logs) below -
1. AEM Dispatcher -
[14/Sep/2022:13:36:04 +0000] [I] [cm-pyyyyy-ezzzzzz-aem-publish-696c599768-kdcc7] "GET /favicon.ico" 40410ms [publishfarm/0] [actionnone] publish-pyyyyy-ezzzzzz.adobeaemcloud.com
[14/Sep/2022:13:36:30 +0000] [I] [cm-pyyyyy-ezzzzzz-aem-publish-696c599768-ndc9d] "GET /favicon.ico" 4047ms [publishfarm/0] [actionnone] publish-pyyyyy-ezzzzzz.adobeaemcloud.com
[14/Sep/2022:13:36:33 +0000] [I] [cm-pyyyyy-ezzzzzz-aem-publish-696c599768-ndc9d] "GET /favicon.ico" 4047ms [publishfarm/0] [actionnone] publish-pyyyyy-ezzzzzz.adobeaemcloud.com
[14/Sep/2022:13:36:47 +0000] [I] [cm-pyyyyy-ezzzzzz-aem-publish-696c599768-ndc9d] "GET /favicon.ico" 4047ms [publishfarm/0] [actionnone] publish-pyyyyy-ezzzzzz.adobeaemcloud.com
[14/Sep/2022:13:37:08 +0000] [I] [cm-pyyyyy-ezzzzzz-aem-publish-696c599768-kdcc7] "GET /favicon.ico" 40410ms [publishfarm/0] [actionnone] publish-pyyyyy-ezzzzzz.adobeaemcloud.com
[14/Sep/2022:13:37:09 +0000] [I] [cm-pyyyyy-ezzzzzz-aem-publish-696c599768-ndc9d] "GET /favicon.ico" 4047ms [publishfarm/0] [actionnone] publish-pyyyyy-ezzzzzz.adobeaemcloud.com
[14/Sep/2022:13:37:16 +0000] [I] [cm-pyyyyy-ezzzzzz-aem-publish-696c599768-ndc9d] "GET /favicon.ico" 4047ms [publishfarm/0] [actionnone] publish-pyyyyy-ezzzzzz.adobeaemcloud.com
2. HTTPD Access Logs -
cm-pyyyyy-ezzzzzz-aem-publish-696c599768-kdcc7 - - 14/Sep/2022:13:36:04 +0000 "GET /favicon.ico HTTP/1.1" 404 212 "https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
cm-pyyyyy-ezzzzzz-aem-publish-696c599768-ndc9d - - 14/Sep/2022:13:36:30 +0000 "GET /favicon.ico HTTP/1.1" 404 212 "https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
cm-pyyyyy-ezzzzzz-aem-publish-696c599768-ndc9d - - 14/Sep/2022:13:36:33 +0000 "GET /favicon.ico HTTP/1.1" 404 212 "https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
cm-pyyyyy-ezzzzzz-aem-publish-696c599768-ndc9d - - 14/Sep/2022:13:36:47 +0000 "GET /favicon.ico HTTP/1.1" 404 212 "https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
cm-pyyyyy-ezzzzzz-aem-publish-696c599768-kdcc7 - - 14/Sep/2022:13:37:08 +0000 "GET /favicon.ico HTTP/1.1" 404 212 "https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
cm-pyyyyy-ezzzzzz-aem-publish-696c599768-ndc9d - - 14/Sep/2022:13:37:09 +0000 "GET /favicon.ico HTTP/1.1" 404 212 "https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
cm-pyyyyy-ezzzzzz-aem-publish-696c599768-ndc9d - - 14/Sep/2022:13:37:16 +0000 "GET /favicon.ico HTTP/1.1" 404 212 "https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
@arunpatidar, @Jörg_Hoh, @Kunal_Gaba_, @B_Sravan, @Mohit_KBansal, @kautuk_sahni, @Asutosh_Jena_
Thanks,
Rohan Garg
Solved! Go to Solution.
@Rohan_Garg Usually browser/search engines make favicon request under root domain, ie. /favicon.ico
I suggest you add a redirect rule to handle this request
RewriteRule ^/favicon.ico$/etc.clientlibs/brandA/clientlibs/clientlib-favicon/resources/favicon-brandA-32x32.png [PT,NC,L]
* Just test if .ico will work with .png response.
@Rohan_Garg Usually browser/search engines make favicon request under root domain, ie. /favicon.ico
I suggest you add a redirect rule to handle this request
RewriteRule ^/favicon.ico$/etc.clientlibs/brandA/clientlibs/clientlib-favicon/resources/favicon-brandA-32x32.png [PT,NC,L]
* Just test if .ico will work with .png response.
Hi Mohit, Thanks for the quick reply!
I had added the below rule which did not work -
#Rewrite Rule for Favicon
RewriteRule "^/favicon.ico" "/etc.clientlibs/brandA/clientlibs/clientlib-favicon/resources/favicon-brandA-180x180.png" [PT,L]
Any issue with the above redirect rule you think ?
Avoid quote " in your syntax
RewriteRule ^/favicon.ico$/etc.clientlibs/brandA/clientlibs/clientlib-favicon/resources/favicon-brandA-32x32.png [PT,NC,L]
I tried to replace the rule with the one below -
RewriteCond %{REQUEST_URI} ^/favicon.ico$ RewriteRule ^/favicon.ico$ /content/dam/<folder-name>/favicon.ico [NC,PT]
Still the issue is not resolved -
HTTPD Access Logs -
cm-pxyzxy-exyzxyz-aem-publish-859d67ddf9-fvjlv - - 15/Sep/2022:07:25:05 +0000 "GET /favicon.ico HTTP/1.1" 404 212 "https://publish-p57852-e459121.adobeaemcloud.com/systemready" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
AEM Dispatcher Logs -
[15/Sep/2022:07:25:05 +0000] [I] [cm-pxyzxy-exyzxyz-aem-publish-859d67ddf9-fvjlv] "GET /favicon.ico" 40411ms [publishfarm/0] [actionnone] publish-pxyzxy-exyzxyz.adobeaemcloud.com
Are you able to hit /favicon.ico or getting 404 ?
Ideally, a redirection rule should solve the issue, considering its configured correctly.
Yes, the /favicon.ico is giving valid response.
It means, the issue is solved. are you still seeing same frequency of 404 in apache and publisher logs?
Yes, I am still able to see the 404 in HTTPD Access Logs -
cm-pyyyyy-exyzxyz-aem-publish-859d54ddf9-9jmcv - - 15/Sep/2022:12:39:38 +0000 "GET /favicon.ico HTTP/1.1" 404 212 "https://publish-pyyyyy-exyzxyz.adobeaemcloud.com/systemready" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
Even in AEM Dispatcher Logs -
[15/Sep/2022:12:37:37 +0000] [I] [cm-pyyyyy-exyzxyz-aem-publish-859d54ddf9-fvjlv] "GET /favicon.ico" 40410ms [publishfarm/0] [actionnone] publish-pyyyyy-exyzxyz.adobeaemcloud.com
[15/Sep/2022:12:37:57 +0000] [I] [cm-pyyyyy-exyzxyz-aem-publish-859d54ddf9-9jmcv] "GET /favicon.ico" 4048ms [publishfarm/0] [actionnone] publish-pyyyyy-exyzxyz.adobeaemcloud.com
Do you have multiple virtualhosts hosted on the same server? The same request may be coming from other domains also.
Currently there are only 2 virtual hosts - one is the default.vhost and other is our custom vhost. The default.vhost is set to * for ServerAlias
Request may be coming from other virtualhost in this case.
I will update the same redirect rule in the other vhost and try. Will update shortly how it goes!
Thanks for the input!
@Mohit_KBansal - Handling this on the other vhost worked!
[15/Sep/2022:15:16:29 +0000] [I] [cm-pyyyyy-e459121-aem-publish-859d54ddf9-9jmcv] "GET /favicon.ico" 40410ms [publishfarm/0] [actionnone] publish-pyyyyy-exyzxyz.adobeaemcloud.com
[15/Sep/2022:15:16:37 +0000] [I] [cm-pyyyyy-e459121-aem-publish-859d54ddf9-9jmcv] "GET /favicon.ico" 4048ms [publishfarm/0] [actionnone] publish-pyyyyy-exyzxyz.adobeaemcloud.com
[15/Sep/2022:15:16:53 +0000] [I] [cm-pyyyyy-exyzxyz-aem-publish-859d54ddf9-9jmcv] "GET /content/dam/brandA/favicon.ico" 3027ms [publishfarm/0] [actionnone] publish-pyyyyy-exyzxyz.adobeaemcloud.com
[15/Sep/2022:15:16:59 +0000] [I] [cm-pyyyyy-exyzxyz-aem-publish-859d54ddf9-9jmcv] "GET /content/dam/brandA/favicon.ico" 3026ms [publishfarm/0] [actionnone] publish-pyyyyy-exyzxyz.adobeaemcloud.com
So ideally then the default.vhost should handle the favicon.ico request ? Can we ignore it as well to let it throw 404 ? The below log shows the request took 40s+ to be handled. Hence, I think we should have one rewrite rule by default in the default.vhost. What do you think ?
[15/Sep/2022:15:16:29 +0000] [I] [cm-pyyyyy-exyzxyz-aem-publish-859d54ddf9-9jmcv] "GET /favicon.ico" 40410ms [publishfarm/0] [actionnone] publish-pyyyyy-exyzxyz.adobeaemcloud.com
Hi @Rohan_Garg,
Firstly, I assume that you might have already considered writing a rewrite rule, if not – see if this example helps as reference.
RewriteCond %{REQUEST_URI} ^/favicon.ico$ RewriteRule ^/favicon.ico$ /content/dam/<folder-name>/favicon.ico [NC,PT]
Secondly, even though you have a correct rewrite rule, make sure your "/etc.clientlibs/brandA/clientlibs/clientlib-favicon/resources/favicon*" (your favicon path) is not blocked, as we usually block the etc/* paths.
Thirdly, I would suggest moving your client libs to apps and that is what even Adobe suggests and make use of allow proxy property to get access to your resources folder under client libs.
Hi Sravan, Thank you for your response.
Our clientlibs are already present in /apps/projectFolder/clientlibs with allowProxy set to true.
The etc.clientlibs is not blocked but rather allowed in our filter rules.
I will give the rewrite rule to /content/dam/brandsA/favicon.ico and place a dummy asset in DAM.
Will let you know how it works out! Thanks!
Update - The issue is still not resolved -
HTTPD Access Logs -
cm-pxyzxy-exyzxyz-aem-publish-859d67ddf9-fvjlv - - 15/Sep/2022:07:25:05 +0000 "GET /favicon.ico HTTP/1.1" 404 212 "https://publish-p57852-e459121.adobeaemcloud.com/systemready" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
AEM Dispatcher Logs -
[15/Sep/2022:07:25:05 +0000] [I] [cm-pxyzxy-exyzxyz-aem-publish-859d67ddf9-fvjlv] "GET /favicon.ico" 40411ms [publishfarm/0] [actionnone] publish-pxyzxy-exyzxyz.adobeaemcloud.com
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies