How to Change Og:url after migrating https and keep your social counters
-
Hello everybody. I use Yoast SEO and I had to migrate from http to https. After migration I lost the count of pages’ sharings: I would like to get that count back. I tryied the solution provided here but wasn’t able to get the result I want.Getting in the details, I’m having some trouble on getting the og:url changed to “http” (the previous shared version). I added the filter
add_filter( 'wpseo_opengraph_url', 'my_opengraph_url' ); function my_opengraph_url( $url ) { return str_replace( 'https://', 'https://', $url ); }
in the function.php but og:url didn’t change from https to http. I need this to get back my previous Social share count after migrating from http to https (I don’t know if .httaccess rewrite of every http request to https may affect this parameter/facebook crawler).
Anybody could help please? Thank you.
- The topic ‘How to Change Og:url after migrating https and keep your social counters’ is closed to new replies.