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)
Peter
-
Wednesday, May 27, 2009
10:54:49 AM
good to know I'm not the only person using zune:)