• Resolved scsmytty

    (@scsmytty)


    Hi there,

    We recently moved our site from our old domain (fifteenfiftyone.ca/blog) to a new one (gengeorget.com). 301 Redirects are in place and everything is hunky dory. I’m trying to set everything up so the Facebook likes on the posts at the original domain show up on the new domain. I’ve followed the facebook instructions here – https://developers.facebook.com/docs/sharing/webmasters/crawler#updating. I’m using Meta Tag Manager to add in the og:url tag for the old posts. The problem that I have is that there are now 2 og:url tags in the post. Is there a way to change og:url output on a post by post basis? (see following post as an example: https://gengeorget.com/portraits/baby-grace-portraits/)

    P.S. I know that I’m not using the WP Facebook OGP plugin but I’ll switch if it can help fix my problem.

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Chuck Reynolds

    (@ryno267)

    Hey man.
    Yeah I see you’re using YoastSEO right now. My plugin doesn’t do anything different than his in regard to OGP so they’re both going to return the current site URL for that post/page.

    I see that you have this too:

    
    <!-- Meta Tag Manager -->
    <meta property="og:url" content="https://www.fifteenfiftyone.ca/blog/family/baby-grace-portraits/" />
    <!-- / Meta Tag Manager -->
    

    While that’s fine, it’s displayed in source before YoastSEO’s output so Facebook will read the last one in source; ie not that one. So option 1 is to see if you can change the priority of that plugin’s output to something higher like 999 OR…

    YoastSEO allows for the filtering of the OGP URL output. Read about that here: https://kb.yoast.com/kb/change-og-url/

    Unfortunately there’s not a super easy way to do it; and I don’t even have anything built into my plugin to handle that as what you have is an edge-case. So I hope that helps you out man. Cheers!

    Thread Starter scsmytty

    (@scsmytty)

    Thanks for the quick reply Chuck. Do you know if it is a problem having 2 og:url tags? I get a warning from the facebook share debugger that I should fix it, but it doesn’t specifically say what kind of problems could occur. I assume that it could confuse the facebook crawler. Is that it?

    Plugin Author Chuck Reynolds

    (@ryno267)

    It is an issue… like i said FB will take the last appearing one in source. I’d suggest looking at the yoastseo filter route for long term.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changing the og:url output’ is closed to new replies.