Keeping Facebook likes on new domain

Avatar
  • Answered
Hey InMotion,

We recently built a new WordPress site to replace our old WordPress site. The site structure is the same, only the domain has changed. We are having problems getting our Facebook likes from the old domain to show on the new domain.

We have already successfully set up a 301 redirect, such that any hit from a page to our old WordPress redirects the user to the same url on the new domain. No problem there.

I have consulted the following page on Facebook's site: https://developers.facebook.com/docs/sharing/webmasters/crawler#updating

#1 -- I have added the following to our .htaccess redirect on the old WordPress to except facebook's crawler:

RewriteCond %{HTTP_USER_AGENT} !(Facebot|facebookexternalhit/1.1) [NC]

So, my first question is: is this correct?

#2 -- My second question is: I am very confused with Facebook's instructions concerning the addition of a AAAA record. I don't understand what needs to be done in the DNS. Could you offer me some guidance here?

#3 -- My third question is this: The page also says there are "two steps" to updating the URL: (1) Exempt the Facebook crawler from your HTTP redirect (which I have addressed above), and (2) Use the old page as the canonical URL for the new page. Can you please tell me if both of these steps need to be done, or if it is one or the other?

Thanks for your help!
Avatar
IMH Support Agent 5
Hello KG, Thanks for submitting a question about your new WordPress site and Facebook likes. On question #1, I would hesitate to guess if that is correct beyond the syntax you are using, which appears to be fine as far as I can see. However, Facebook provides some detailed guides in their developer documentation, which will surely be of more help to you. For question #2, having not read the same instructions you have it would be difficult to clarify them. However, if you only needed to add an AAAA record, which, according to cPanel, is just a record that points a hostname to an IPV6 address, and can be added with the Zone Editor, our Live Support team can help you with that. Regarding question #3, I can only assume the instruction is to perform both steps. Best, Christopher M.