Canonical OG URL fails in URL linter because of redirect - redirect

I recently changed domain name for my site and migrated my content. Most URLs from the old site use a 301 redirect to the new site, as you would guess.
In an effort to retain FB like and comment data, I kept the og:url property set to the old URL, since it is the original and canonical identifier in Open Graph. I implemented in August, and it was working properly, with previous like data retained. Now it is not working and showing previous like data, and fails in the URL Debugger.
Here is an example from the new site:
http://seattle.findwell.com/million-things-to-do-seattle/washington-brewers-festival-2011
In URL Debuggger, it now returns this error:
There was an error in fetching the object at URL 'http://seattle.findwell.com/million-things-to-do-seattle/washington-brewers-festival-2011/', or one of the the URLs specified via a redirect or the 'og:url' property including one of http://www.hometalkin.com/seattle/million-things-to-do-seattle/washington-brewers-festival-2011/.
Nothing has changed in my OG tags. Has something changed with canonical URL in open graph that causes it to fail when a redirect is in place?

This page:
http://seattle.findwell.com/million-things-to-do-seattle/washington-brewers-festival-2011
has this og:url:
<meta content="http://www.hometalkin.com/seattle/million-things-to-do-seattle/washington-brewers-festival-2011/"
property="og:url" />
but when you actually go to (in fact - when Facebook crawler tries to go to) this URL from og:url the site redirects you back to:
http://seattle.findwell.com/million-things-to-do-seattle/washington-brewers-festival-2011/
This is a circular reference.
In order to fix it you need to change your og:url to:
http://seattle.findwell.com/million-things-to-do-seattle/washington-brewers-festival-2011/

I actually had a very difficult time with this when I was first starting out as a developer.
I made a tool for this exact purpose -- as I thought it might be helpful to others:
Facebook/Open Graph Like Button Generator
It generates (and stores) the open graph tag(s) so you don't need to put them in your page and the 'Redirect URL' tells it where to send all the traffic.
It detects the Facebook bot/scraper too so it won't interfere with anything :)
Good luck

I had exactly the same problem.
I have changed my website url and I have over 40.000 radios with fb likes and comments.
Example:
http://www.radioways.com/fr/radio/nrj.html
to
http://www.radioways.fr/radio/nrj.html
I spend days and days reading and checking the forum and I did not find the answer...
Here is what to do:
1. In the og canonical, you need to put your old website url
2. In the Iframe url, you can put both. The result of the likes, will be the addition of the likes of the ogcanonical + the likes of the Iframe
An this will not work (and this is why I spent so much time USELESS) untill you validate those setup with FB
Best regards.

Related

Facebook Likes Button Reset to Zero after Website Migration [duplicate]

I understand the og:url meta tag is the canonical url for the resource in the open graph.
What strategies can I use if I wish to support 301 redirecting of the resource, while preserving its place in the open graph? I don't want to lose my likes because i've changed the URLs.
Is the best way to do this to store the original url of the content, and refer to that? Are there any other strategies for dealing with this?
To clarify - I have page:
/page1, with an og:url of http://www.example.com/page1
I now want to move it to
/page2, using a 301 redirect to http://www.example.com/page2
Do I have any options to avoid losing the likes and comments other than setting the og:url meta to /page1?
Short answer, you can't.
Once the object has been created on Facebook's side its URL in Facebook's graph is fixed - the Likes and Comments are associated with that URL and object; you need that URL to be accessible by Facebook's crawler in order to maintain that object in the future. (note that the object becoming inaccessible doesn't necessarily remove it from Facebook, but effectively you'd be starting over)
What I usually recommend here is (with examples http://www.example.com/oldurl and http://www.example.com/newurl):
On /newpage, keep the og:url tag pointing to /oldurl
Add a HTTP 301 redirect from /oldurl to /newurl
Exempt the Facebook crawler from this redirect
Continue to serve the meta tags for the page on http://www.example.com/oldurl if the request comes from the Facebook crawler.
No need to return any actual content to the crawler, just a simple HTML page with the appropriate tags
Thus:
Existing instances of the object on Facebook will, when clicked, bring users to the correct (new) page via your redirect
The Like button on the (new) page will still produce a like of the correct object (but at the old URL)
If you're moving a lot of URLs around or completely rewriting your URL scheme you should use the new URLs for new articles/products/etc, but you'll need to keep the redirect in place if you want to retain likes, comments, etc on the older content.
This includes if you're changing domain.
The only problem here is maintaining the old URL -> new URL mapping somewhere in your code, but it's not technically difficult, just an additional thing to maintain in the future.
BTW, The Facebook crawler UA is currently facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)
I'm having the same problem with my old sites. Domains are changing, admins want to change urls for seo etc
I came to conclusion its best to have some sort uniqe id in db just for facebook - from the beginning. For articles for example I have myurl.com/a/123 where 123 is ID of the article.
Real url is myurl.com/category/article-title. Article can then be put in different category, renamed etc with extensive logic for 301 redirects behind it. But the basic fb identifier can stay the same for ever.
Of course this is viable only when starting with a fresh site or when implementing fb comments for the first time.
Just an idea if you can plan ahead :) Let me know what you think.

Preserve Facebook Likes, 301 Redirects, href tags, and canonical URLs [duplicate]

I understand the og:url meta tag is the canonical url for the resource in the open graph.
What strategies can I use if I wish to support 301 redirecting of the resource, while preserving its place in the open graph? I don't want to lose my likes because i've changed the URLs.
Is the best way to do this to store the original url of the content, and refer to that? Are there any other strategies for dealing with this?
To clarify - I have page:
/page1, with an og:url of http://www.example.com/page1
I now want to move it to
/page2, using a 301 redirect to http://www.example.com/page2
Do I have any options to avoid losing the likes and comments other than setting the og:url meta to /page1?
Short answer, you can't.
Once the object has been created on Facebook's side its URL in Facebook's graph is fixed - the Likes and Comments are associated with that URL and object; you need that URL to be accessible by Facebook's crawler in order to maintain that object in the future. (note that the object becoming inaccessible doesn't necessarily remove it from Facebook, but effectively you'd be starting over)
What I usually recommend here is (with examples http://www.example.com/oldurl and http://www.example.com/newurl):
On /newpage, keep the og:url tag pointing to /oldurl
Add a HTTP 301 redirect from /oldurl to /newurl
Exempt the Facebook crawler from this redirect
Continue to serve the meta tags for the page on http://www.example.com/oldurl if the request comes from the Facebook crawler.
No need to return any actual content to the crawler, just a simple HTML page with the appropriate tags
Thus:
Existing instances of the object on Facebook will, when clicked, bring users to the correct (new) page via your redirect
The Like button on the (new) page will still produce a like of the correct object (but at the old URL)
If you're moving a lot of URLs around or completely rewriting your URL scheme you should use the new URLs for new articles/products/etc, but you'll need to keep the redirect in place if you want to retain likes, comments, etc on the older content.
This includes if you're changing domain.
The only problem here is maintaining the old URL -> new URL mapping somewhere in your code, but it's not technically difficult, just an additional thing to maintain in the future.
BTW, The Facebook crawler UA is currently facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)
I'm having the same problem with my old sites. Domains are changing, admins want to change urls for seo etc
I came to conclusion its best to have some sort uniqe id in db just for facebook - from the beginning. For articles for example I have myurl.com/a/123 where 123 is ID of the article.
Real url is myurl.com/category/article-title. Article can then be put in different category, renamed etc with extensive logic for 301 redirects behind it. But the basic fb identifier can stay the same for ever.
Of course this is viable only when starting with a fresh site or when implementing fb comments for the first time.
Just an idea if you can plan ahead :) Let me know what you think.

Facebook likes reset to zero

I've seen many posts with similar problem but no concrete solution.
I had 38 likes on my website and one day it was reset to 0. Now I've updated the script (as given on FB website) but have lost all my likes.
How can I get my likes back?
I had 38 likes on my website: http://www.buildingmanager.com.au
According to http://graph.facebook.com/http://www.buildingmanager.com.au/ you got 37 shares right now.
and one day it was reset to 0. Now I've updated the script (as given on FB website) but have lost all my likes.
In your like button code, you have given a different URL,
<div class="fb-like fb_edge_widget_with_comment fb_iframe_widget"
data-href="http://www.buildingmanager.com.au/sfmportal/" …>
– and that URL has only one share (http://graph.facebook.com/http://www.buildingmanager.com.au/sfmportal/)
And putting your base URL through the debugger shows that you’re a) redirecting to the second URL, and more importantly b) have given the second URL as content of the "og:url" meta tag.
If you want your likes from http://www.buildingmanager.com.au/ to show up using the like button for either of those URLs – then you will have to give that URL as "og:url", so Facebook knows you consider this the “actual” Open Graph URL to be liked.
If you are not willing/able to do that, because you want http://www.buildingmanager.com.au/sfmportal/ to be the new, actual URL for your project – then you’ll have a fresh start now, whether you like it or not ;-)
Are you sure nothing has changed at your side. Maybe a redirection? It's very unlikely to have Facebook set your likes to zero. But if there is a very slight at your URL, then it would. Maybe some recent plugin you've installed? Or moved your pages/changed URLs of your posts etc. You may use the Facebook debugger at https://developers.facebook.com/tools/debug for more info about your URLs. Hope it helps, because it's just not logical for Facebook to do such a thing.
I had a similar problem with one of my websites.
It was fixed by specifying that "/index.php" part after the ".com" to get the likes/shares back.
I had the same problem sometime back. The url in the og:url had https://... while the one in the like button element had http://...
They should match.

Embeded Video No Longer Works

So we have a series of movie trailers that we have been embedding in Facebook, and they worked up until the recent changes. This means, when you embedded them, they displayed an image and you could play the video.
Now they suddenly stopped working. I have gone over the Open Graph tags, and they seem correct, but obviously something is missing.
Do you see anything with this link that is in error http://www.totaleclips.com/test-Player/Facebook.aspx?eclipid=e95147&bitrateid=267&vendorid=1011&FB=1
Any advice is appreciated
This may not be the only/core issue but your og:url tag is pointing to http://www.Image-Entertainment.com which means Facebook will go to THAT url and take the tags from there - the og:url tag should point to the canonical URL for a piece of content
In this case, if it's just a test it should probably point to http://www.totaleclips.com/test-Player/Facebook.aspx?eclipid=e95147&bitrateid=267&vendorid=1011&FB=1 - in production it should probably point to whichever URL is the permanent URL for the video, that URL must have the correct meta tags (also).
You should run your URL through the Facebook debugger - it may not always be entirely clear what the issue is (especially where there's HTTP or og:url redirects taking place) but it shows what Facebook is detecting on your page

How can I move a URL via 301 redirect and retain the page's Facebook likes and Open Graph information?

I understand the og:url meta tag is the canonical url for the resource in the open graph.
What strategies can I use if I wish to support 301 redirecting of the resource, while preserving its place in the open graph? I don't want to lose my likes because i've changed the URLs.
Is the best way to do this to store the original url of the content, and refer to that? Are there any other strategies for dealing with this?
To clarify - I have page:
/page1, with an og:url of http://www.example.com/page1
I now want to move it to
/page2, using a 301 redirect to http://www.example.com/page2
Do I have any options to avoid losing the likes and comments other than setting the og:url meta to /page1?
Short answer, you can't.
Once the object has been created on Facebook's side its URL in Facebook's graph is fixed - the Likes and Comments are associated with that URL and object; you need that URL to be accessible by Facebook's crawler in order to maintain that object in the future. (note that the object becoming inaccessible doesn't necessarily remove it from Facebook, but effectively you'd be starting over)
What I usually recommend here is (with examples http://www.example.com/oldurl and http://www.example.com/newurl):
On /newpage, keep the og:url tag pointing to /oldurl
Add a HTTP 301 redirect from /oldurl to /newurl
Exempt the Facebook crawler from this redirect
Continue to serve the meta tags for the page on http://www.example.com/oldurl if the request comes from the Facebook crawler.
No need to return any actual content to the crawler, just a simple HTML page with the appropriate tags
Thus:
Existing instances of the object on Facebook will, when clicked, bring users to the correct (new) page via your redirect
The Like button on the (new) page will still produce a like of the correct object (but at the old URL)
If you're moving a lot of URLs around or completely rewriting your URL scheme you should use the new URLs for new articles/products/etc, but you'll need to keep the redirect in place if you want to retain likes, comments, etc on the older content.
This includes if you're changing domain.
The only problem here is maintaining the old URL -> new URL mapping somewhere in your code, but it's not technically difficult, just an additional thing to maintain in the future.
BTW, The Facebook crawler UA is currently facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)
I'm having the same problem with my old sites. Domains are changing, admins want to change urls for seo etc
I came to conclusion its best to have some sort uniqe id in db just for facebook - from the beginning. For articles for example I have myurl.com/a/123 where 123 is ID of the article.
Real url is myurl.com/category/article-title. Article can then be put in different category, renamed etc with extensive logic for 301 redirects behind it. But the basic fb identifier can stay the same for ever.
Of course this is viable only when starting with a fresh site or when implementing fb comments for the first time.
Just an idea if you can plan ahead :) Let me know what you think.