How to Recover Social Media Share Counts when Migrating from HTTP to HTTPS

I recently transitioned my website, DepressionBoss.com, from HTTP to HTTPS. When I completed that migration to a more secure website, all my social media counts were reset to zero! When migrating from HTTP to HTTPS, the migrated website is considered a new URL, and therefore all the HTTP social media counts are not migrated over to the new URL. I was using the WordPress Plugin AddToAny, and the previous social media share counts were only for when the site was HTTP, and now with HTTPS, the count reset to zero, as it considers HTTPS a different website.

What’s needed is that you need to add code to add the old HTTP social media counts to the new HTTPS social media counts. Fortunately, for the AddtoAny plugin, I just needed to add one line of code.

First, go to your WordPress dashboard, and click on ‘Plugins’ tab. Then click on ‘settings’ of the AddToAny Plugin:

Then add the following JavaScript code to the “Additional JavaScript” box in settings of AddToAny:

 
 
 a2a_config.counts = { recover_protocol: 'http' };

 

Press the ‘Save Changes’ button, then voila! You are done! Your old HTTP social media share counts are now added to your new HTTPS counts:

My website, DepressionBoss.com, is hosted on an AWS EC2 instance, in a Bitnami WordPress Stack.

Leave a Comment

Your email address will not be published. Required fields are marked *

"