Reputation: 2873
I have a single "share to facebook" link on my site using Django Social Share. The issue is that the link being posted to Facebook isn't being scraped - the image, the description, and the title are not populating. All OG meta tags are present and correct, so I checked the Facebook Sharing Debugger and it shows the following error:
SSL Error
Can't validate SSL Certificate. Either it is self-signed (which will cause browser warnings) or it is invalid.
Curl Error
Curl error: 60 (SSL_CACERT)
The site's SSL cert is perfectly valid - no errors or warnings at all. I'm using LetsEncrypt on Apache with a Django app behind it through WSGI. No issues with any other social networks.
An example of one of the links giving this error: https://www.netizen.net/news/post/2643/netizen-ranks-184-on-the-2020-inc-5000-list
As you can see if you visit the page, there are no SSL errors. The same link is scraped just as expected on LinkedIn, Twitter, and elsewhere but FB seems to have this issue.
Upvotes: 1
Views: 1357
Reputation: 2873
So, after going back in forth in the comments I found the solution based on guidance from CBroe. In short, Let's Encrypt doesn't automatically include the SSLCertificateChainFile
in the "standard" Apache configuration it performs, so it needs to be added manually. Once I did that, the links started sharing as expected on Facebook.
However, it only seemed to work properly using the chain.pem
file as the chain file and NOT the fullchain.pem
which includes extraneous certificate(s). Once I configured Apache as below, rebooted Apache, and ran the SSL check, it started working:
...
SSLCertificateChainFile /etc/letsencrypt/live/mydomain.com/chain.pem
...
Now, the SSL certificate passes ALL checks and has an "A" rating and is trusted in all devices/platforms because the correct chain file is included:
Upvotes: 1