Topic-icon Opengraph image not showing on linked-in when using https

Active Subscriptions:

None
Hi there,

Our website is completely accessible through https and our Apache uses a rewrite rule to redirect every http-request to https. Everything works fine except that linked-in does not show the open graph image that is defined by JFBConnect when I try to share a link to our website. All other social networks that I have tested (Facebook, Twitter, Google+) work fine with https. As a work-around I have modified the rewrite rule in Apache so that http-requests coming from linked-in bot are not rewritten - with this the og:image works if addressed through http by linked-in. But the big disadvantage of this is that users can not easily share articles on our website, because they always use https-requests.
Funny enough a rewrite-rule that rewrites https-requests coming from linked-in bot to http does not have any effect on this issue.

Do you have any idea what could cause this problem?

Regards,
Axel
The topic has been locked.
Support Specialist
Axel,
I'm not sure I'm following the problem you're having.

Can you tell me if the og:image tag in the HTML is using http or https? Obviously, it should be https based on what you say. If not, then LinkedIn may just be choking because it has to follow a redirect and may be unhappy with that.

If the og:image tag is an https link, then can you share (or Private Message) a test URL that isn't working so we can try the share button ourselves? This site, and many others, are https-only, so there's not a hard-rule that LinkedIn needs non-https images.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
9 years 2 months ago - 9 years 2 months ago #61400 by abooltink
Hi Alex,

Thanks for your reply. All the og:image links are indeed https and I know that other https-sites work well with LinkedIn. But strange enough, our website www.comex.eu does not and I have no idea what causes this.
For easier testing without having troubles with the cache of linked-in I have created 5 URLs that you can use:
www.comex.eu/test1
www.comex.eu/test2
www.comex.eu/test3
www.comex.eu/test4
www.comex.eu/test5
but of course any other URL on our website shows the same effect, if they have an og:image tag (did not yet put a default image in the configuration).

Here is our standard-rewrite rule for https, at the moment the special LinkedIn part is disabled:
# Rewrite all to https - except LinkedIn
RewriteCond %{HTTPS} off
#RewriteCond %{HTTP_USER_AGENT} !linkedinbot [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301]

If I enable the LinkedIn part "RewriteCond %{HTTP_USER_AGENT} !linkedinbot [NC]" http requests coming from LinkedIn are not rewritten and I can correctly share articles if I use the http-link in LinkedIn.

Funny enough the problem is only with LinkedIn. Facebook, Twitter and Google+ show no problems.

Regards,
Axel
Last edit: 9 years 2 months ago by abooltink.
The topic has been locked.
Support Specialist
Thanks for the links. Unfortunately, I don't see any reason why the images aren't loading properly. The tags look right, the image loads fine and I've used multiple 3rd party 'bot' tools to make sure there's nothing blocking the images from being loaded.

Since everything that JFBConnect is doing looks right and I don't see any HTML issues with other content on your site, that means this looks to be a LinkedIn problem. I'd have to recommend you contact them. They use StackOverflow for their support area. I did a quick search and found multiple similar posts, though none with answers I'd say are a definite fix. There may be some pointers in there to help, or I'd recommend posting your own:
stackoverflow.com/search?q=%5Blinkedin%5D+https+og%3Aimage

I hope that helps and definitely let us know what you find out.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
Hi,

I finally found what the problem was: if in Apache's ssl-config file (in our case default-ssl) ServerName or ServerAlias are not set or do not match the name on the SSL-certificate, the server sends an "Unrecognized Name"-warning. This warning is ignored by nearly every client (browsers, facebook, search engine bots, ...) but the LinkedIn bot stops loading.

Although Twitter ignores this warning and displays correctly, you can use the Twitter card validator (cards-dev.twitter.com/validator) to check for this issue, because it throws an error message. Or you use Wireshark to listen on ip-traffic but for this particular issue the Twitter card validator is easier and good enough.

Best regards,
Axel
The topic has been locked.
Support Specialist
Axel,
Wow, amazing sleuthing there. I'm glad to hear you got to the bottom of the cause as that's definitely not something we would have found.

I hope it's all smooth sailing from here, but if you run into anything else or need further assistance, just let us know.

Finally, if you haven't already, please consider leaving a rating and review for JFBConnect, or our support, on the Joomla Extension Directory. It's certainly not required, but very appreciated:
extensions.joomla.org/extensions/extensi...l-display/jfbconnect

Thanks,
Alex
The topic has been locked.