How To Search Engine Optimize a Silverlight Web Application
- 4
- Add a Comment
Welcome Back! I hope you enjoy the content on this site. If you have not done so already, you may want to subscribe to my RSS feed or become a fan of this blog on Facebook. Thanks for visiting!
1. The Issue
The problem with all Rich Internet Applications (RIA) and particularly Silverlight is the inability for search engines to read and index the content of the site.
If we take for example an ecommerce application that relies heavily on Silverlight. All the content and products descriptions are embedded in the Silverlight client and therefore invisible to the search engines bots. Compare it to a regular ASP.Net or any web application for that matter that spits out HTML and all the content is there to crawl and index.
This blog post will try and address this issue and provide a few solutions - to each its cons and pros - to work around this limitation while waiting for the day search engines will start indexing embedded content.
2. Displaying content along side the Silverlight Client
The first solution will use of Master Pages to show the Silverlight object as well as content relevant to the product or page selected.
Master and Content Page Relationship
Remember that search engine bots can’t render the Silverlight application so all they see is the content displayed in the content place holder and that’s the content that will be indexed. The way to display this content is beyond the scope of this post but should follow the guidelines of content SEO.
The Silverlight application can handle all the shopping experience (shopping cart, size, quantity and color selection…) while the content place holder resides bellow the Silverlight object and displays the product description, user reviews etc…
<%@ Master Language="C#" ... %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>MyProducts Page</title> </head> <body> <div id="content"> <object data="data:application/x-silverlight-2," type="application/x-silverlight-2"> <param name="minRuntimeVersion" value="3.0.40305.0"/> <param name="source" value="ClientBin/ECommerce.xap"/> <asp:ContentPlaceHolder ID="ProductContent" runat="server"/> </object> </div> </body> </html>
Sample Master Page
This way we can have a great User Experience while still making the bots happy and giving them something to munch on.
While this seems like an acceptable solutions in some scenarios where all the content has to be displayed in the rich client it becomes an unsatisfactory solution.
3. Displaying different content for the search engine bots and for the users
The second solution is a bit riskier as in their fight against spam sites and link farms search engines can sometimes detect this an penalize the sites for showing different content for the user and for the crawlers; but in the case where you can’t use the first solution, this is for you.
Basically, the concept is quite simple when a user visits the site a Silverlight version is displayed while when a crawler does; only the HTML rendered version.
The implementation for this solution would vary depending on the architecture and design of the site. There are different ways either through User Controls, different Content Pages or HTTPHandlers.
4. Using a Robot.txt
The robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating we spiders and other web robots from accessing all or part of a website which is otherwise publicly viewable. Robots are often used by search engines to categorize and archive web sites, or by webmasters to proofread source code. The standard complements Sitemaps, a robot inclusion standard for websites.
The robot.txt file can be used to restrict access to the pages that contain the Silverlight client and show an optimized for crawlers version of the site. When a user visits the indexed pages they can be redirected to the Silverlight version.
5. Using a SiteMap
The Sitemaps protocol allows a webmaster to inform search engines about URLs on a website that are available for crawling. A Sitemap is an XML file that lists the URLs for a site. It allows webmasters to include additional information about each URL: when it was last updated, how often it changes, and how important it is in relation to other URLs in the site. This allows search engines to crawl the site more intelligently. Sitemaps are a URL inclusion protocol and complement robots.txt, a URL exclusion protocol.
Sitemaps are particularly beneficial on websites
-
- where some areas of the website are not available through the browsable interface, or
- where webmasters use rich Silverlight, Ajax or Flash content that is not normally processed by search engines.
The webmaster can generate a Sitemap containing all accessible URLs on the site and submit it to search engines. Since Google, MSN, Yahoo, and Ask use the same protocol now, having a Sitemap would let the biggest search engines have the updated pages information.
Sitemaps supplement and do not replace the existing crawl-based mechanisms that search engines already use to discover URLs. By submitting Sitemaps to a search engine, a webmaster is only helping that engine’s crawlers to do a better job of crawling their site(s). Using this protocol does not guarantee that web pages will be included in search indexes, nor does it influence the way that pages are ranked in search results.
Hope that was helpful.
Hatim
P.S Please leave a comment I would love to have some feedback
Sources:
Wikipedia 1 and 2, msdn
4 Comments
William Yip
March 26th, 2009
at 11:10pm
I was looking for solution to exactly the same issue recently. The 2nd solution sounds like the most straight forward one, but like you said, it’s risky, and actually, it really is against google’s policy.
Hatim
March 27th, 2009
at 9:30am
Hey William
Yes it is against google’s policy but to some extent you can get away with it without getting penalized. I believe it’s based on your linking scheme and the notoriety of who links to the site.
Also if your respond with code 301 instead of just injecting the content straight in the page. 301 is bad business!!
DotNetShoutout
March 29th, 2009
at 6:22pm
How To Search Engine Optimize a Silverlight Web Application…
Thank you for submitting this cool story - Trackback from DotNetShoutout…
Haroon
December 14th, 2009
at 7:21am
Thanks for submiting this use full article.I have one question regarding seo.
According to theory
Silverlight Application runs on One HTML or ASP page,It we creates navigation under sliver light application which showing multiple silverlight XAML or frames what ever you call on diffrent clicks. But if an engine says to you there is a reference to supercalifragilisticexpialidocious in your file, how the user will jump to the exact page or XAML? Should he has to go through 42 pages before getting the information? Unless you add an internal search engine to your application.