If you’ve lost your Facebook shares because you move your site to HTTPS/SSL, this article is just for you
Websites with a lot of Facebook likes are bound to lose some likes when they move their site to https. That is because Facebook sees your https URL as a completely different URL. You can’t move the likes, shares or comments directly to the new URL but you can use the old URL as the canonical source for the number of likes or shares at the new URL.
How Facebook see your page?
When resolving which URL a like or share action should be attributed to, Facebook uses a process to resolve the canonical URL for URL that’s been loaded. When a URL is loaded, the crawler will look for:
- A HTTP 301 or 302 Redirect
- The use of an og:url open graph tag in the page
- The use of rel=canonical as described in RFC 6596. (Facebook’s crawler only supports content, not HTTP headers.)
If any of these methods result in an URL that’s different than the URL originally loaded, the specified URL will be considered the “canonical URL” for the original URL. If required, the crawler will also follow a chain of redirects to find the canonical URL.
All likes and shares will be attributed to the canonical URL instead of the loaded URL.
What did you need to do to make a proper migration without losing my share counters?
By controlling the canonical URL you can move content from one URL to another and retain like and share counts, as long as you allow Facebook to continue to resolve the new URL into the old one. This can be done with one of two methods:
Add an og:url tag to the new URL which points at the old URL (Preferred)
In your new URL, you should include a link to the old URL. For example, if your new URL was https://example.com/post-url, and the old URL was http://example.com/post-url, you should include this snippet in the https://example.com/post-url:
<meta property="og:url" content="http://example.com/post-url" />
Using this method tells the crawler that the canonical URL is at the old location, and it will use that to generate the number of likes and shares on the page. Any new likes and shares will continue to aggregate on the old URL as well.
Sounds complicated if you are not a developer? Here is the secret that will make it simple
In Easy Social Share Buttons for WordPress, we simplified all that with just option switch inside social share optimization tags. All you need to do is visit Social Sharing -> Sharing Optimization and activate under Facebook Open Graph Settings the option that you wish to Use HTTP version of page in social tags
Join our list
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.