Search Engine Optimization for .NET

Search Engine Bot Detection

So after I first noticed a large build up of strange session Urls in Google searches for my domain I've then done a little bit of research into the issue and discovered it was .NET not detecting that the search engine spider was Mozilla/5.0 compliant and inserting some rubbish session id into the url.

It's been nearly a week since my changes to correct this and there's already a small indication of the 'healing' process. The pages are not out of the index yet, (and yes I do know that I 'could' remove them manually) but there are a lot of urls, and I'm in no rush.

ASP.NET Url Cleanup

Note on Webparts

Another change I have made this week was completing stripping webparts out of my template. Now even though I think webparts are extremely cool...they render HTML Soup. So I'd probably recommend that if you have a site where you are trying to get it to rank via the content, don't use webparts. If its an admin section / personalisation portal / intranet site or any other scenario when content ranking is not important, then by all means, feel the soup power!

Apart from dropping 20k from my page here's another unexpected result:

Frontpage validates as XHTML 1.0 Transitional

Yey I pass validation on W3C!!

Evil ViewState

Well I think viewstate is fantastic, its a set-and-forget automagic keep-state for all things on your form. Only problem is it renders before the content. This is a bad thing because search phrases gain more significance the closer they are to the top of the document, so the idea is to keep the soup at the bottom. A bit of Googling shows there are various methods that have been implemented to move it to the bottom. The method I kind of agreed with (although I've lost the link d'oh) was where a basepage class simple overrides handling the viewstate and uses the LosFormatter to store it in the session. Now I only half agree with this, I like the idea of overriding the handling of the viewstate but not putting it in the session. I simply used this but added my own HiddenControl (i.e. __VIEWSTATE_SEO) to the bottom of the form on pre-render, easy.

New Blog Category

In respect of all these new things that appear to be common SEO problems I have created to new category for SEO.NET (Search Engine Optimisation for .NET) blog posts. And in addition to this I will be trying to starting a small toolkit of classes and resources that should be able to be applied to any ASP.NET 2.0 application to make it more SEO friendly.


Move ViewState to the bottom of the form BasePage.cs or view Source online

Code Snippets ASP.NET SEO.NET
Posted by: Brendan Kowitz
Last revised: 21 Sep 2013 12:15PM


12/19/2006 4:13:07 AM
Session viewstate article:
12/19/2006 12:43:05 PM
Thanks Steve.

No new comments are allowed on this post.