Comodo SSL Trustlogo installation on site
Comodo is a pretty popular SSL provider and our client decided to purchase certificate there.
They also wanted to install Trustlogo icon with a popup that shows info about domain.
Usually, you can use the quick setup from Comodo – https://ssl.comodo.com/free-trust-logo.php
Or:
- download TrustLogo / use your custom logo.
- Add this code before your </head> closing tag12345<script type="text/javascript"> //<![CDATA[var tlJsHost = ((window.location.protocol == "https:") ? "https://secure.comodo.com/" : "http://www.trustlogo.com/");document.write(unescape("%3Cscript src='" + tlJsHost + "trustlogo/javascript/trustlogo.js' type='text/javascript'%3E%3C/script%3E"));//]]></script>
- Add this at the final location on the page before </body> closing tag123<script language="JavaScript" type="text/javascript">TrustLogo("https://example.com/trustlogo.jpg", "CL1", "none");</script>
Please, note that https://example.com/trustlogo.jpg should be changed on the real absolute URL of the TrustLogo on your server
Of course I got a few problems.
First, I got the text – “IdAuthority™ Credentials are NOT available for this site”. This is fine for your local server, as no valid domain is supplied to Comodo. The issue appeared on a dev/live sites on client domains as well, and this is not fine, totally.
The reason is in this line of code:
1 | TrustLogo("https://example.com/trustlogo.jpg", "CL1", "none"); |
Comodo support team quickly replied on the raised ticket that I used wrong certificate type – CL1. They recommended change this to SC2.
Ok, popup now shown (yay!)
Wait, why I see the scrollbars?
Iframe content is wider than iframe itself (weirdo). So CSS/JS hacks won’t work here, and they seem ridiculuos to me to be applied on the out-of-the-box widget. No main site styles collisions here as well.
Luckily, I had a fellow developer in contact who successfully installed TrustLogo on his site – just use SC5 instead of SC2.
The final code will be
1 | TrustLogo("https://example.com/trustlogo.jpg", "SC5", "none"); |
And now the widget is shown without any issues.
Hope that saved some time for you!