Thursday 30 June 2011

The fb_xd_Fragment and the FaceBook Like button

The fb_xd_Fragment
This is bit of code can appear sometimes in facebook's link back to your site from the facebook like button. However, it's not you, it's them that are creating the extra work for you.

Some sites recommend you correct this in google, bing and yahoo webmaster tools etc. Probably the smarter thing to do is to first ensure you use correctly the canonical  link rel tag. View our How to use the link rel canonical tag.

If you are using apache, you might want to include some code to get around any blank page issue. The following code and the above link are also on our web page that discusses the fb_xd_Fragment

This is the apache code we recommend at this time:

<IfModule mod_rewrite.c>
RewriteEngine ON
#Facebook Redirect For Added String
RewriteCond %{QUERY_STRING} .*fb_xd_fragment.*
RewriteRule ^(.*)$ http://www.websiteadministrator.com.au/$1? [R=301,L]
</IfModule>


This either drops enough of the offending code or removes it completely from the browser link (use your own www address). So this seems to do the job but should probably be modified a little further. Feel free to add your work-arounds to this post.

Follow up on the above fb_xd_fragment note:
The above code seems to have correctly resolved the issue i was facing on my host. To follow the error, i was using statcounter's landing page url. The landing page is now correct in my reports. No reference to the fb_xd_fragment is reported in the landing page data anymore, just the correct url.


No comments:

Post a Comment

Important Note:

Anyone is free to post links here but only if a back link to this site (or www.websiteadministrator.com.au) is added from your blog or website.