A Solution To The Facebook fb_xd_fragment Problem

Back in December, Danny Sullivan provided clarity for us on social signals that Google and Bing count as ranking factors. More recently, I spoke with Stefan Weitz who let me know that my results may be personalized if a friend of mine has “Liked” something related to my search query — i.e., that page my friend Liked will show up higher in the search results.

What this suggests is that having those Like buttons on the appropriate pages of your site. In addition to the SEO benefits, it may also show up on the Walls of the friends of the person Liking the page (more on this in a moment). So you should put Like buttons on all the pages of your site, right?

If only the web were so simple!

Not so fast! There are some additional interactions you should know about before you do this. The problem is that the use of the Like button appears to create a phantom page for your site with the query string ?fb_xd_fragment appended to it. Worse still, the pages can be found and indexed by the search engines, and the existence of these pages does appear to impact your search traffic.

You can see how big an impact this has by searching on “inurl:fb_xd_fragment” in Google. This brings up 199,000 results, most of which are similar to ones you see in this screen shot:

Your instinctive reaction might be that this creates a duplicate content situation, but it is more complex than that. Instead, what happens when you go to one of these pages is you get this:

Yep, a big ol’ page full of nothing. In fact, the actual content of the page appears to flash quickly in front of you, and then the blank page comes up.

How Big Of A Problem Is This?

Unfortunately, it costs you search traffic. We implemented Like buttons on a client website in January of 2011. Then after a few weeks, we noticed that we had seen a drop in traffic of about 8%. Because of the constant tuning of search algorithms, we did not think much of it at the time. We certainly did not connect the traffic drop with the implementation of the Like buttons.

But then a week or so later, we noticed in Google Analytics that we were getting traffic to pages that had this ?fb_xd_fragment parameter attached to them. We knew that we had not created those so we began to dig into the matter more, and we learned that the Like button was creating these pages for us. We implemented a fix for this (discussed below) and within a week or so our traffic recouped the 8% that it had lost.

This taught us that the issue was a serious SEO issue, so we began to dig into the options. One of the first things we learned was about the mechanics of the Like button as it works today.

Understanding Like Button Mechanics

When a site visitor clicks on a Like button it brings up a window that looks like this:

Notice how it offers the user an opportunity to enter in a description. This is an option, and if they decline to do so, they can still click Post to Facebook and the page they “Liked” will get posted to their Wall.

However, if they enter in a description, Facebook goes further and will post the fact that the user Liked the page on their Wall and the Walls of their friends. This results in a much broader distribution of the Liked content. This behavior is similar to what the Facebook Share button does.

How To Solve The fb_xd_fragment Problem

Fortunately, there is a way to address this. Unfortunately, it is not that well documented and you need to stumble across it by accident. So here is what you need to do:

Step 1 – Create a simple html file with the following code in it:

Step 2 – Modify your FB.init file. This is a file you need to have on your page anyway to implement a Like button, but with the right tweak you should be all set. Here is what it looks like with the correct code in it:

The Channel URL defaults to nothing, and you need to set it to point at the HTML file you created in Step 1. As you can see in this example, I named the file channel.html.

Note that you will see suggestions on the web that you can use the Like button in a frame to get around the fb_xd_fragment problem, but the downside of that solution is that it does not offer the user the opportunity to enter a description and will not post anything on the Wall of the friends of the person who just liked your page.

What About the Share Button?

You might ask why not focus on using the Share button instead? You can do that, and it does work for the time being, but Facebook has indicated its intent to stop supporting the Share button. However, it requires the user to enter the description and automatically posts the update on the Walls of the visitor’s friends. That’s a good thing!

And What About The Send Button?

In my opionion the Send button is an interesting option. It allows users to ship content to be people on a more select basis. You can email it to them, post it to their wall, or post it on the wall of a Facebook Group.

Key Takeaways

You can go ahead and use the Share button for now since it still works and it forces the user to enter in a description and shares the content with their friends. However, I expect this to stop working at some point in time, and I don’t want to have to think about that. Our preferred solution at Stone Temple Consulting is to use the Like button with the patch outlined here and you should be able to avoid the fb_xd_fragment problem, and then add the Send button in cases where it seems appropriate.

Opinions expressed in the article are those of the guest author and not necessarily Search Engine Land.

Related Topics: Channel: SEO | Enterprise SEO | Facebook

Sponsored


About The Author: is the president of Stone Temple Consulting, an SEO consultancy outside of Boston. Eric publishes a highly respected interview series and can be followed on Twitter at @stonetemple.

Connect with the author via: Email | Twitter | Google+ | LinkedIn



SearchCap:

Get all the top search stories emailed daily!  

Share

Other ways to share:

Read before commenting! We welcome constructive comments and allow any that meet our common sense criteria. This means being respectful and polite to others. It means providing helpful information that contributes to a story or discussion. It means leaving links only that substantially add further to a discussion. Comments using foul language, being disrespectful to others or otherwise violating what we believe are common sense standards of discussion will be deleted. Comments may also be removed if they are posted from anonymous accounts. You can read more about our comments policy here.
  • benwalsh

    I have the facebook like buttons in my templates for most pages. How do I check if this is a problem for us?

    I looked in analytics and do see fb_xd_fragment in content drilldown but only during late February and early March and only in our forum not for our main pages or other subdomains.

    Could google have fixed this or am I likely to have more hits for these pages?

  • http://www.malcolmcoles.co.uk malcolm coles

    I implemented this a couple of weeks ago but still see the fragment in GA with multiple page views for the URLs. Any clue why it wouldn’t have worked?

  • Lou Garay

    I had also noticed this issue in regard to custom facebook pages. Upon dropping tracking code into said page and waiting a few days I noticed a few pages with the ‘/?fb_xd_fragment=’ query affixed to different custom pages. (For example, I would see stats on a page called ‘/ABC/’ and ‘/XYZ/’ but I would also see stats for ‘/ABC/?fb_xd_fragment=’ and ‘/XYZ//?fb_xd_fragment=’) Is there a similar fix for this? Is this also caused by the Like button? Hope someone out there has an answer for me because it seems as though every fix for this is in regard to a ‘Like’ button on a page NOT on facebook.

  • http://www.facebook.com/anthony.d.baker Tony Baker

    This is great but I’m still a bit confused. I too have noticed that fb_xd_fragment thing show up in google analytic and was wondering about that. So I would definitely like to fix this but I am unclear about what you have suggested above.

    At present for my site I have the following code for the like button on each page of my site:

    How do I implement the code you show to what I have and why do you have us creating a new html file?  A bit confused, could you elaborate please?Thanks so much.  Anthony

  • Travis Miller

    Thanks for the info, but this post is very misleadingly worded. Facebook does not “create” new pages on your site (that’s impossible); one does not modify the “FB.init file” (there is no FB.init “file”; rather, one modifies the call to the FB.init method); and “Understand Like Button Mechanics” does not actually explain how Facebook uses these ?xd_fb_fragment= URLs (or why adding the channel.html file solves the problem).

    Terminology matters. You wouldn’t tell someone to rotate their tires when you really wanted them to change their spark plugs, but that’s basically what you’re doing here.

 

Get Our News, Everywhere!

Daily Email:

Follow Search Engine Land on Twitter @sengineland Like Search Engine Land on Facebook Follow Search Engine Land on Google+ Get the Search Engine Land Feed Connect with Search Engine Land on LinkedIn Check out our Tumblr! See us on Pinterest

 
 

Click to watch SMX conference video

Join us at one of our SMX or MarTech events:

United States

Europe

Australia & China

Learn more about: SMX | MarTech


Free Daily Search News Recap!

SearchCap is a once-per-day newsletter update - sign up below and get the news delivered to you!

 


 

Search Engine Land Periodic Table of SEO Success Factors

Get Your Copy
Read The Full SEO Guide