How to Make Facebook Comments SEO Friendly

I’ve been looking at Facebook comments lately and I think they’re great. There is one problem, though. As far as I can tell they’re not very SEO friendly.

So while Facebook comments are generally higher quality and less prone to trolling, they don’t offer much value to websites that leverage comments for SEO.

Of course it’s an interesting time for publishers as their platforms become more and more Facebook dependent. Most will confirm that referral traffic from Facebook continues to grow, so it makes sense to continue investing there. However, it’s still important to maintain some control over how The Google sees and processes your pages, and even more so if your content is the type that generates long comment threads. All those comments help to send a lot of good signals to The Google; all the right signals actually like relevancy, freshness, and perfect organic keywords.

Google likes signals.

I reached out to Facebook’s unofficial (?) SEO guy Alex Schultz on Twitter to ask about better SEO support for Facebook comments. I didn’t hear back, though. I was curious if they planned to address this issue in future iterations of their social plug-ins. Ideally they would offer a version of comments the bots could read well, along with some form of a permalink for each comment.

At the same time I also wondered how Disqus, another large comment engine, handled this issue. Disqus CEO Daniel Hu confirmed via Twitter that they serve up a plain-text version within an invisible DIV layer, which is something the Google-bot can easily crawl. Upon doing some test searches, this does appear to work well for most (but not all) sites using Disqus.

Google is never crazy about hidden text, but they do allow it in some cases where Javascript is used. It’s very important, however, that you show EXACTLY the same content a normal user would see. Obviously if you change or manipulate the content, Google takes issue with that. In the case of Facebook comments it might be best to simply render the comments as they appear through the Facebook APIs (minus some of the UI and buttons).

To be honest, though, I’m not exactly sure what’s the best way to handle something like this. I thought it might help to get things started and publish some easy code to render Facebook comments in plain-text. From there I’m hoping others adapt the code and improve upon it. So down below you can download the code to get started or click here to see it in action. If you load that page and view source you can see the comments rendered in a hidden DIV.

Publishers implement Facebook comments in many different ways.  So I’m hoping to get feedback in the comments on whether this worked for you. Please let me know if it did, or if you find a better solution.

Download Code



Comments Closed

24 Comments about “How to Make Facebook Comments SEO Friendly”

  1. Ben Krull Says:

    Hi Sean,

    Good stuff, I’ll check out your code and let you know how it goes.
    I’ve been following all Facebook Comments SEO updates closely on our blog (http://www.pointit.com/blog/facebook-comments-seo/). Do you mind if I add a link to your post as another resource?

    Also, did you see this update from Facebook – http://developers.facebook.com/blog/post/490? They published some PHP code to pull comments from the Graph API that could be helpful.

    Thanks,
    Ben Krull

  2. Sean Percival Says:

    Yes go ahead and link back to this post there.

    Thanks for the FB dev link. I had not seen those updates. Looks like they already addressed permalinks as well.

  3. Rahul Says:

    Facebook is amazing, but i don’t want to send all my traffic to my facebook page, because i can’t get any data to analyze. I prefer to balance my traffic to my website and my facebook page.
    but, it’s a very nice thought of you, worth a try.

  4. indtvforum Says:

    Of course, one thing you will always look while blog commenting is that the comment is related to the article at hand. You do not want to raise red flags for spamming another article just to improve the optimization of your Internet search engine. You have to actual practice. If the comment is not related to the topic, you will not only get flagged but you will also confuse those who may have a propensity to visit your site. What spam does irritate visitors to view your site and make sure you become something of a pariah in the community of bloggers.

  5. brianmike Says:

    I was very encouraged to find this site. I wanted to thank you for this special read. I definitely savored every little bit of it and I have bookmarked you to check out new stuff you post.

    Animation Courses

    9711226188

  6. Offyourfeet Says:

    Thanks for sharing this blog with us.

  7. adumi Says:

    Hi Sean Percival,
    Thank you for this code!
    i tested it on my site and when i view source i see I get 2 errors:

    Warning: file_get_contents(https://graph.facebook.com/comments/?ids=http://MyDomainName.com/index.php) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error
    in /home/MyDomainName/public_html/index.php on line 71

    Warning: Invalid argument supplied for foreach() in /home/MyDomainName/public_html/index.php on line 133

    I created an app in FB that has the MyDomainName for url.
    Am i forgetting something here ? Do I need to alter anyhting in your code ?
    Thanks !

  8. Is the Facebook Comment Box Social Plugin bad for SEO? - Quora Says:

    [...] you can connect with them and grab text expecting to crawl.Searching quickly I found this in PHP:http://www.seanpercival.com/blog…And also you in Facebook Developers: http://developers.facebook.com/d…How can I get an SEO boost [...]

  9. Tony Says:

    Ah this is great. We’ve just implemented Facebook comments over on our site (http://www.sickchirpse.com) and have noticed a significant drop in Google search term results directing to our sites. Hopefully this will sort it out!

  10. Tony Says:

    Just one question Sean, where exactly do I put this code? In my single post page?

  11. Cyber Tech Zone Says:

    Sir, can you tell why make a post with high search terms trought SEO? I still waiting your answere.

  12. test Says:

    test

  13. goodguyndfw Says:

    Was working a while back but now getting this:

    Warning: Invalid argument supplied for foreach() in /home/greggory/public_html/atest.php on line 132

    It appears the json decode is not working correct:

    $url = self::GRAPH_COMMENTS_URL . $ids;

    $content = file_get_contents($url);
    $comments = json_decode($content);
    $comments = $comments->$ids->data;

    Any ideas? What changed? something on FB side I take it and what’s a fix?

  14. MLM Software Delhi Says:

    thanks 4 sharing this article i ve a blog name http://mlmcompanyindia.blogspot.com i ll use these tips 4 my blog & thanks 4 sharing this article !

  15. no waiting traffic cone Says:

    great comments well presented

  16. Gabriel Cole Says:

    Awfully educative bless you, I presume your trusty audience may well want a great deal more blog posts along these lines continue the excellent content.

  17. Ankit Oberoi Says:

    FYI, the script has stored XSS.

    Try placing the following as comment:

    alert(‘XSS’);

  18. Lita Doud Says:

    Thanks for posting this Plugin info. I am sure a lot of people are going to find it to be very useful. I have book marked your blog.

  19. search engine optimization Tampa Says:

    I beloved as much as you will obtain performed proper here. The sketch is attractive, your authored material stylish. nonetheless, you command get got an nervousness over that you want be turning in the following. sick without a doubt come further formerly again as exactly the same nearly a lot steadily within case you defend this hike.

  20. seo king Says:

    Hi,
    Search engine optimization (SEO) is the process of improving the visibility of a website or a web page in search engines via the “natural” or un-paid (“organic” or “algorithmic”) search results. In general, the earlier (or higher ranked on the search results page), and more frequently a site appears in the search results list, the more visitors it will receive from the search engine’s users.

    seo king

  21. Him Says:

    This is exactly what I was trying to find. Thanks for writing on this topic!

    I was able to extract facebook comments and publish it on my webpage, but I’m stuck at the point wondering how to render it on the page. Facebook comments are already showing once as a part of the plugin.

    You have touched upon hidden text. I’v for now left the extracted fb comments as “hidden div” on my page. But I’m worried if Google might flag this and deindex pages or something.

    Is there any way to tell Google its genuine need of the page and the content that is hidden is being shown to the reader already ??

    Thanks.

  22. how to seo Says:

    I am extremely impressed together with your writing skills as smartly as with the structure in your blog. Is that this a paid subject matter or did you modify it your self? Either way keep up the nice quality writing, it’s uncommon to peer a great weblog like this one nowadays..

  23. Google's Indexing Facebook Comments-Any SEO Benefit? Fred Williams-SEO Guy Says:

    [...] Friendly – Facebook Comments Don’t Add Value In Terms Of SEOGoogle to Index Facebook Comments?How to Make Facebook Comments SEO Friendly[Facebook Comments Box] Adding Facebook Comments Box Social Plugin Widget on your website in 2 [...]

  24. Him Says:

    Written a blog post regarding the same issue. Appreciate comments and feedback. Thanks!
    http://indiadoodles.blogspot.com/2011/10/adding-facebook-moderated-comments-to.html

Published: May 13th, 2011 | 8,921 views