Recover Facebook Share Counts After Moving from HTTP to HTTPS

The most important part of retaining social share counts when moving from HTTP to HTTPS is the redirect of all links on the website to the new HTTPS version. This can be done easily by adding the following code to the website's .htaccess file (in the public_html directory).

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L]

Note: Make sure you change "yoursite.com" with your website's URL.

Even with this change, Facebook share counts may not transfer over. Old links to HTTP pages will land correctly on HTTPS versions of the page, but share counts may appear to be "lost."

If this is the case, then follow these steps to recover share counts. This will need to be done on each page where you want to recover those share counts.

1. Go to Facebook's Sharing Debugger tool at https://developers.facebook.com/tools/debug/

2. Enter the NON-HTTPS version of the link into the field and click on the Debug button.



3. Click the Scrape Again button, which will clear out the number of like shown (and also change the Canonical URL to the HTTPS version).

4. In your page/post, go to the Advanced (gear icon) section of the Yoast SEO widget and enter the original NON-HTTPS version of the page/post link in the Canonical URL field. Save/update the changes to the page/post.



5. Go back to Facebook's Sharing Debugger tool and enter the HTTPS version of the page/post link, and click on the Debug button.

6. Click the Scrape Again button in order to get Facebook to pull the new information with the updated HTTP version of the Canonical URL that has all of the likes on it.



The share counts on the new HTTPS version of the blog post should now be updated with the share counts from before the move off of HTTP.

  • facebook, https, social media
  • 0 Users Found This Useful
Was this answer helpful?

Powered by WHMCompleteSolution