5

I have an article on my site that has published in a wrong category. I wanted to change the category, and since the category name is part of the url, I than added a 301 redirection to the updated url. That article had also several likes, but after the 301, it was reset to 0 likes, since to Facebook this is now as a new url with no likes. If I remove the 301 than the likes count is updated again. Is there a way to notify FB that a certain url is a result of a 301 that has likes count? I assume it is relevant as well for pages with FB comments

Tunaki
  • 132,869
  • 46
  • 340
  • 423
Maor Barazany
  • 761
  • 2
  • 11
  • 21
  • possible duplicate of [Like button does not work with a 301 redirection](http://stackoverflow.com/questions/7240057/like-button-does-not-work-with-a-301-redirection) – competent_tech Dec 27 '12 at 01:15
  • possible duplicate of [How can I move a URL via 301 redirect and retain the page's Facebook likes and Open Graph information?](http://facebook.stackoverflow.com/questions/7197919/how-can-i-move-a-url-via-301-redirect-and-retain-the-pages-facebook-likes-and-o) – Igy Feb 19 '13 at 23:15

1 Answers1

4

You would need to set the "href" or "data-href" property of the like button to the original url that had the like counts, depending on which like button you are using. Facebook will not follow redirects.

bkaid
  • 51,465
  • 22
  • 112
  • 128
  • 2
    Actually, Facebook does follow redirects, but will attribute the 'like' to the final destination, not one of the intermediate steps (as far as I know) - your solution is correct though. If the OP wants to maintain the like count they need to point the like button at the old URL, and serve the original open set of meta tags to the Facebook crawler at that original URL (even if other browsers are 301 redirected to the new address) – Igy Oct 07 '11 at 19:34
  • @Igy yes i meant that FB doesn't follow redirects for like counts. like counts are tied to specific urls and like counts can't get moved to new url's through means of redirection. – bkaid Oct 07 '11 at 20:43
  • Thank you both for the explanation. My site is dynamic and creates the url for the like button automatically as the url of the page, so changing it manually for one url may be a bit difficult. It is really annoying that FB can't handle this better. Thanks – Maor Barazany Oct 08 '11 at 16:02
  • I will mark it, though it does not solve the issue as it should be. But as it appears there is no way to really solve the issue right now. I hope that FB will do something about this.. One more post about this issue I found [here](http://blog.hubspot.com/blog/tabid/6307/bid/22166/SEO-301-Redirects-Don-t-Pass-Existing-Social-Shares.aspx) – Maor Barazany Oct 08 '11 at 19:20