How to Get Your Tweets Indexed by Google

posted may 4, 2012 at 2:58am

Even though it makes me feel like a child casting magic spells, I feel the need to preface this post with a disclaimer: the opinions expressed here are my own, and not those of my employer.

Wish your hilarious tweets were indexed by Google? Wish your beautiful, smiling face would show up next to those search results? Wish no more! This post will walk you through how to get your tweets indexed by Google.

The Problem

Most of my tweets do not show up in searches, and even when they do they look like:

The Solution

  1. Scraped my public tweets.
  2. Posted them on a site I control.
  3. On my Google+ profile, I added a link to my site to the "Contributor to" section.
  4. On my site, I added author metadata pointing to my Google+ profile.

Hurrah:

Scraping Public Tweets

Thanks to Twitter's swank API, scraping is easy. We don't even need to puzzle out OAuth to make requests for the user timeline:

Hosting Tweets on Your Site

I'll be honest, I don't really know what to say here. However you like to make internet, put up the tweets you scraped in the last step. Static site generating, posting on tumblr, posting on wordpress, using coldfusion to do whatever people in the stone age used coldfusion for—go nuts!

There are only two rules: you should include the text of the tweet so the Googlybots will be able to see it, and you should make sure you site doesn't do any weird robots.txt voodoo or rate limiting to scare away bots. Don't worry, having no robots.txt or a normal robots.txt you copied from somewhere like html5 boilerplate will be fine--you'd have to go out of your way to scare away the precious search engine gremlins.

Linking to Your Site From Your Profile

Pretty simple: add a link to your fancy new Twitter mirror in the Contributor To section on your profile.

One odd step here: make sure a face is clearly visible in your profile picture. It's a step I ignored from the directions for authorship that set me back a month or two on getting this working. Don't be dumb like me.

Linking to Your Profile From Your Site

Just when you thought the rest of this howto was useless, I have a chance to earn my keep again. To avoid adding any ugly links to your tweets, we can put a link to your profile the <head> of your document:

Mmm... delicious metadata. No bulky links, no fuss. At this point you should be able to verify that everything worked by pasting your url into the rich snippet testing tool:

Wait for it…

If your website is anything like mine, it doesn't update often and it doesn't get a lot of visitors. That means those precious search engine crawlers we made a beautiful nest for are not in a huge rush to scour your site for updates.

When they finally do show up, you will be able to share your witticisms with the world outside of twitter: