Gregg Hilferding


Introducing expandUrl, redirect resolution for the rest of us

To solve a problem I describe in detail below, I recently created a new site called expandUrl. The expandUrl™ service does a few things very well:

  • Tells you the "real" URL of any shortened URL (regardless of what service provides it).
  • Gives technical types the redirect codes involved in all the redirects for any particular link.
  • Discovers both canonical and shorturl data for the final expanded URL.
  • Offers a fast API for quickly finding the expanded URL (and a less fast API for getting the same detailed data that is available from the web interface).

Heard enough? Go check it out:

expandurl

The expandUrl™ site was built to fix a specific problem I recently discovered on one of my other sites, so you can be confident that expandUrl™ has been tested on a sample set of a couple thousand real-life URLs. However, the total number of hours I've spent building expandUrl™ can still be counted on one hand so you are bound to discover some edge cases which I haven't encountered.

I appreciate all bug reports to be posted below. Security concerns should also be posted here, but I will pre-moderate those until they are fixed. (Not to hide them, but to give me the opportunity to fix them before they are exploited.)

Eating my own dog food

I run a site which aggregates RSS feeds from a few dozen different sources. One of the included sites accidentally let their domain name expire and had to move to a new domain name. This particular site also hosted their RSS feed with Feedburner.

When the site changed domain all the URLs were broken. You may be thinking, "Well, duh. There's nothing you can do to fix that." In this scenario however, the original site owner simply changed domain names. All of the old URLs would map perfectly to the new domain name:

Old: http://example.com/blog/2007/04/post.html

New: http://example.org/blog/2007/04/post.html

If I had stored the actual URLs, I could simply do a REPLACE in the database. However, since I stored the Feedburner URLs in my database, it would be impossible for me to do so. That's because Feedburner obfuscates the actual URL data:

Actual URL: http://example.com/blog/2007/04/post.html

Feedburner URL: http://feeds.feedburner.com/~r/exampleblog/epRL/~3/745213668/post.html

I quickly built expandUrl so that I could resolve any URL (be it a short url, tracking script, or feed redirect) to the actual URL. I then ran an automated script to determine the relative link on the old domain, replaced the old domain with the new domain, and updated the database accordingly. An hour or so later, and all those posts are now fixed.

I ran this script against the entire database of URLs to go ahead and resolve any other redirects found. I made an interesting discovery. Many of the RSS feed services will generate multiple redirect URLs for the same blog post permalink. My database had a UNIQUE index on the URL field as a means of preventing the same post from showing up multiple times, but it turned out the feed services were inadvertently circumventing that "protection."

In the end, integrating expandUrl has cleaned over 300 duplicate URLs from my database and helped improve the future maintainability of the link data the site has collected.

If you find expandUrl™ helpful, I'd love to hear about it! :)

Published by Gregg Hilferding on April 27th, 2009 at 7:30 am. Filed under PHP,SEO,Signal,Social Media,Webmaster2 Comments

Biz Stone on Google Swallowing Twitter

Via Daring Fireball, I found this particular answer from Twitter founder Biz Stone most intriguing:

ME: Don’t you get worried about being swallowed up by Google?

BIZ: They don’t swallow you up. They call you up.

To me, being called up was what happened when the Army sent my unit to Iraq. I suspect Biz has a different meaning.

Published by Gregg Hilferding on April 22nd, 2009 at 3:15 pm. Filed under Google,Signal,Social MediaNo Comments

Social Media Marketing Strategy

During my preparation for a recent presentation on social media marketing, I spent a lot of time thinking about how the different sites work together, Twitter in particular.

My audience ranged from people with little or no experience marketing online to people who are already actively managing multi-site social media campaigns. When I have to express something that must inform the new as well as the experienced, I often create an info-graphic:

How Twitter Fits into the Social Media Landscape

All the arrows that point from each social network to your website represents traffic. Twitter promotes your website but is also able to promote some of the other social networks as well. The key here is that your website must be the focus of your efforts.

You'll find many "Social Media Gurus" who will tell you that Twitter should be the center of this illustration, but the truth is that all your efforts should be generating qualified leads to your site. Too many social media plans look like this:

Social Media FAIL

Whenever you find yourself focusing on Twitter follower count, your Facebook Page fan count, or how many views your latest YouTube video received, it's time to look at the two graphics above and ask yourself where your focus is. Most of all, remember that Twitter is just a tool to promote your own site and all your other efforts online.

Published by Gregg Hilferding on April 19th, 2009 at 5:53 pm. Filed under Social Media1 Comment

Irony at it’s best

Via Understanding Google Maps & Yahoo Local, the words of a Locksmith recently banned from Google Maps:

After that many of my claimed listings got hijacked by my competitors, I knew I’ll crack the method to do it myself & that I’ll send you my revelations in order to shut down this option.

So we have a locksmith who considers it acceptable to test and defeat a company's security. Does he also walk up and down the streets in his home town trying to break into buildings?

Is there no Locksmith Oath?

Published by Gregg Hilferding on February 21st, 2009 at 2:45 pm. Filed under Google,Noise,SEO,Webmaster,Yahoo1 Comment