Some site enhancements for SEO, Gravatars, Xbox, and Zune

image

I’ve just updated ViNull.com with a few fixes and additions.

The first change is a fix to my sitemap protocol page.  Thanks to Google’s webmaster tools I saw that this page was generating links with and without “www”.  Actually, I was using the server variable “SERVER_NAME” to generate the links, so if you hit the site as vinull.com, you got vinull.com links and if you used www.vinull.com you got links starting with www.vinull.com.  This can cause search engines to think these sites are different, and hurt results.

While fixing the sitemap, I also added an IIS redirect from vinull.com to the www version of the site.  This is quite easy to add, and it’s only my laziness that kept me from doing it sooner.  I trimmed links to tag pages with no tags, and added canonical url meta links to help search engines figure out what a page’s official url is.

Last week I read a post by Jim Wooley on Gravatars and decided I needed to add this to my blog as well.  All you really have to do is create a hash from the user’s email address – the process is outlined by Jim and the Gravatar site.  Jim however clings to a dead programming language, so to save you from searing pain in your retinas here is code building the hash in c#:

public static String GravatarImage(Object email) {
    if (email == null)
        return "http://www.gravatar.com/avatar/default.jpg?s=50";

    MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
    UTF8Encoding enc = new UTF8Encoding();

    Byte[] bytes = md5.ComputeHash(enc.GetBytes(email.ToString().ToLower()));
    String hex = String.Join("", (from b in bytes select b.ToString("X2").ToLower()).ToArray());

    return String.Format("http://www.gravatar.com/avatar/{0}.jpg?s=50&r=G", hex);
}

I the the email in as an Object so when I call the method from an aspx template control, it’s as simple as GravatarImage(Eval(“email”)) where email may or may not exist.  The upside to using hashed emails is Gravatar support is retroactive.

Other changes: I added a CodeStock logo, Xbox and Zune cards to the side bar.  Now you can see what I’ve been playing both in music and games!

Posted By Mike On Friday, May 15, 2009
Filed under blog seo zune sitemaps xbox | Comments (1)

Submit this story to DotNetKicks   

Peter - Wednesday, May 27, 2009 10:54:49 AM

good to know I'm not the only person using zune:)

Leave a comment



Your name:
 

Your email (not shown):
 
Will display your Gravatar image.

Your website (optional):



About Michael

Michael C. Neel, born 1976 in Houston, TX and now live in Knoxvile, TN. Software developer, currently .Net focused. Board member of ETNUG and organizes CodeStock, East Tennessee's annual developers conference. .Net speaker, a Microsoft ASP.NET MVP and ASPInsider. Co-Founder of FuncWorks, LLC and GameMarx.

Proud father of two amazing girls, Rachel and Hannah, and loving husband to Cicelie who inflates and pops his ego as necessary.

 Subscribe to ViNull.com |  Comments

Follow me on Twitter | Contact Me

Related Posts

An SEO and Usability look at ViNull.com

At the start of this year, I changed the design of ViNull.com.  I was tired of the old design, but I also felt the old design was bad on usability.  ... Read more

Google Can You Hear Me?

In June of 2006 I wrote an article titled "Google Can You Hear Me? How to design URLs that are search engine friendly" that also included a sidebar titled ... Read more

ASP.NET: Supporting the Sitemap Protocol

What is the sitemap protocol?  It's the brain child of Google that has caught on with MSN and Yahoo to make it easier for search engines to spider ... Read more

Mike Sells Out

Don't let the new design fool you, after learning what my blog is worth, I'm here to collect. I'm not sure why, but google thinks the best way for this ... Read more

Tell The Truth

I had this for lunch today.  More in a moment. In the documentary Art & Copy Rich Silverstein and Jeff Goodby talk about creating the “Got Milk?” ... Read more

XNA 3D Primer by Michael C. Neel

XNA 3D Primer by Michael C. Neel
Buy Now: [ Amazon ] [ Wrox ]

GameMarx

CodeStock

ASPInsiders Member

ETNUG Member