Silverlight SEO (Search Engine Optimisation / Search Engine Optimization)

One of my new resolutions was to look at Silverlight more closely, especially with regards to search engine optimisation which is something I raised back in May in my "Points of interest #6" post.

What are some of the things I like about Silverlight (this is not a complete list but some quick points in relation to this post):

  • The browser / browser version is taken out of the equation (to a degree). I should hopefully no longer need to worry about html, css and JavaScript support across different browsers and different operating systems. If something looks good on IE 6 on XP it should look and behave the same on Firefox on the Mac.
  • Easily enhance the user experience (I know Ajax and Flash can achieve this as well)
  • Develop every aspect of your application with C# (or any other managed supported language) - yes I eagerly await Silverlight 2 Beta 1 (although I know you can still achieve a lot with Silverlight 1).

Now this is a reduced list (there are many posts out there explaining the benefits Silverlight 1.0 / 2.0 will bring) but point 1 and 2 add a lot of value and if you are not sacrificing seo then you are onto a winner (although in cases where you are building a pure application e.g. an insurance quote application seo plays a lesser role).

I thought I would gather links, posts and my own stuff under a custom domain so I bought and just before the new year (30th December) I knocked up a Silverlight page and uploaded it to see if I could get it indexed by the search engines.

Less than a week later I am glad with the initial results:

Search Term Google Yahoo Live
silverlight seo no 2 out of 408,000 no 12 out of 3,210,000 not yet indexed
silverlight search engine optimisation no 11 out of 95,000 no 46 out of 482,000 (not as good)  not yet indexed
silverlight search engine optimization no 42 out of 782,000 no 14 out of 481,000 not yet indexed
silverlight search engines no 65 out of 215,000 no 43 out of 855,000 not yet indexed

Now it surprised me how quickly I got in there (initially I added  to my signature for my forum posts on and recently I added a link to my blog and posted about it but other than that there are no links pointing to this site that I know of) but I'm glad to see that the approach was accepted and the content indexed.

Now two useful posts about SEO and Silverlight are Michael's October post where he talks about using xslt to extract the content from Xaml and put it into html and Nikhil's May post (I know there are more out there which I will be adding to as time goes on).

When I did this test I had the following in mind:

  • If I generate content (at the moment it is a hard-coded text) where should I store it in the generated Xaml or the host html page?

    - I selected to have the content rendered in html and have Silverlight extract the rendered text from the host page.

  • How would a search engine view what I was doing (am I trying to show one thing to search engines and something completely different to users)?

    - The content that is rendered on the html page (in the future by is the same content that is displayed within the Silverlight application (consider Xaml as a different form of CSS. CSS can be used to style html tags and Silverlight is providing a style and displaying it using xaml tags).

    - Now you wouldn't want to display the same text twice so I altered the Z index of the Silverlight control and made the height and width 100% (I thought I might get my hand slapped for that but it isn't being used for keyword stuffing or anything sinister so I would hope it continues to be accepted).
  • Should I go Silverlight all the way or look for a hybrid solution (now by this I do not mean an app with a silverlight control e.g. a slideshow or video player?

    - Since Silverlight is so new I would say start off with a hybrid approach and take the lessons you learned developing sites and see if you can apply them to Silverlight. Now since this was a demo I haven't decided what I think the best approach would be (I've also not looked at Silverlight in enough depth to even pretend to know what the best approach is when Silverlight is concerned) but I am considering trying the following approach:

    a) A Xaml file per view (instead of having everything within one file) that loads additional pieces of xaml (controls) if and when required.
    b) For each view render the content in html and have Silverlight intelligently extract it. At the moment each textblock calls a JavaScript method that checks the host page for any content with the same id as itself (Loaded="contentdisplaycontrol_loaded").
    c) Use either the new ASP.NET MVC Framework or  Castle's MonoRail to navigate around the Silverlight Application/Site.

    I've not tried this out fully yet but intend to in order to see if the hybrid approach presents the best of both worlds (yes moving from one view to another means a page load but you can still have a nice user experience for view related actions and it could still look very slick).

  • What about accessibility or printing?

    - Screen readers will be able to read the html text and as far as printing is concerned hopefully there will be a printing solution for Silverlight 2.0 but until then you can style the html text via css to look nice when it is printed in Firefox (I've not done that yet so it looks unsightly). Unfortunately IE print preview shows a skewed picture of the Silverlight content.

Now the Xaml/Javascript can easily be pulled from if you want to look under the covers but the description I've given covers the concept.

If you have any Silverlight / SEO related content please let me know and I'll look to add it when I have the site fully up and running.



Comments have been disabled for this content.