Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Switching from HTTP to HTTPS, lost all Facebook “Likes” count

I switch from http to https two months ago, and now lost all my 'Likes'.

Even when I use facebook debug tool it now has the same count between the http:// and https://

Anyone knows whether it is a facebook bug? or is there a workaround solution to retrieve my old 'Like' count?

like image 370
Alex You Avatar asked Dec 03 '14 00:12

Alex You


2 Answers

Typically Facebook likes are linked to a URL. Even a single character change will lose Facebook likes.

Here is a link on Facebook

https://developers.facebook.com/docs/plugins/faqs#moving-urls

Go to the bottom of the page and find this section How do I move a page to a different URL? - can I migrate the number of likes to the new page location?

<meta property="og:url" content="https://example.com/old-url" />

You will need to instruct the facebook crawler to re-scrape your url for the changes to take effect:

https://developers.facebook.com/tools/debug/sharing

That should be a solution to your problem.

like image 122
Amol Avatar answered Dec 21 '22 22:12

Amol


The steps that should be followed in order not to lose Facebook likes when migrating HTTP to HTTPS are:

1. Use 301 Redirect on web page for HTTP to HTTPS.

2. Add og:url tag on the HEAD section for http://www.example.com

<meta property="og:url" content="http://www.example.com" />

3. Modify Facebook code to count HTTPS likes on page:

<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.example.com&amp;width&amp;layout=box_count&amp;action=like&amp;show_faces=false&amp;share=true&amp;height=65" scrolling="no" frameborder="0" allowTransparency="true"></iframe>

or

<div class="fb-like" data-href="https://www.example.com" data-layout="standard" 
      data-action="like" data-show-faces="true"</div>

4. Go to Sharing Debugger on Facebook website.
You must be log on Facebook in order to use it.

Enter https://www.example.com and press Debug button.

enter image description here

5. If no other likes are on the HTTPS version of the page, the following info appears:

**enter image description here**

Press Fetch new information button.

6. If by any chance there are any likes for the HTTPS version of the page or the Facebook crawler already visited your page, the following info appears:

enter image description here

Press Scrape Again button.

7. Refresh your web page and the Facebook likes should be present.

More information about how the Facebook crawler works can be found at:
https://developers.facebook.com/docs/sharing/webmasters/crawler

like image 44
alex.pulver Avatar answered Dec 21 '22 23:12

alex.pulver