Thank you very much for this solution! You really saved me a lot of time!
From my point of view, completely disabling the banlist may not be very secure. So I’ve done some research and found out that the following lines are blocking LinkedIn bot.
RewriteCond %{HTTP_USER_AGENT} libwww [NC,OR]
RewriteCond %{HTTP_USER_AGENT} libwww-perl [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Link [NC,OR]
RewriteCond %{HTTP_USER_AGENT} LinksManager.com_bot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} linkwalker [NC,OR]
I propose to turn on the “Enable Default Banned List” option and then manually remove the following code from .htaccess file. (The “Remove write permissions from .htaccess and wp-config.php” should be disabled before editing). This solution works for me and it would be great if someone could check it too.
I read a lot of information and realized that the problem with the incorrect link preview in LinkedIn is very popular. Many people (including me) were not even aware that it may be caused by security measures in WordPress CMS. Therefore, I would like to ask the Better WP Security author to make some changes in the next releases or investigate this problem and include the solution to the FAQ.
Thanks for this reply John.
But doesn’t this create a security loophole if these useragents are removed from the banned list?
Also doesn’t the plugin re-add them when upgraded, deactivated and Reactivated or reconfigured?
Thanks
This helped me too, thanks a million!
It would be very cool if there was a whitelist ability in that section of the settings….
Which specific bot does LinkedIn report as?
I notice you listed a number of them.
RewriteCond %{HTTP_USER_AGENT} libwww [NC,OR]
RewriteCond %{HTTP_USER_AGENT} libwww-perl [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Link [NC,OR]
RewriteCond %{HTTP_USER_AGENT} LinksManager.com_bot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} linkwalker [NC,OR]
of which I know at least two are not LinkIn.
Would be helpful if someone with LinkedIn experience can pinpoint this for me, so I work to update the Default Banned List appropriately.
Ok, I found the Linkedin bot name:
“LinkedInBot
This line within the ban list prevents LinkedIn from properly grabbing a preview:
RewriteCond %{HTTP_USER_AGENT} ^Link [NC,OR]
I will work to have the removed in future updates.
Any progress on this as the above work-around does not work for me.