<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Sine of the times</title><subtitle type="html" /><id>http://blogs.msdn.com/b/waldred/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/waldred/" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/b/waldred/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2009-03-23T23:28:00Z</updated><entry><title>Silverlight Deeplinks and Redirection</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/waldred/archive/2009/03/30/silverlight-deeplinks-and-redirection.aspx" /><id>http://blogs.msdn.com/b/waldred/archive/2009/03/30/silverlight-deeplinks-and-redirection.aspx</id><published>2009-03-31T08:58:00Z</published><updated>2009-03-31T08:58:00Z</updated><content type="html">&lt;P&gt;An interesting thing comes about with RIA applications and deep-links. Say a user arrives at a deep-link:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://hexadecimate.com/SilverlightStore/Product.aspx?Name=Office+Professional+2007"&gt;http://hexadecimate.com/SilverlightStore/&lt;FONT style="BACKGROUND-COLOR: #ffffcc"&gt;Product.aspx?Name=Office+Professional+2007&lt;/A&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Note that we're representing the deep-link state in the URL as "Product.aspx?Name=Office+Professional+2007".&amp;nbsp;After the Silverlight XAP loads, any subsequent &lt;I&gt;Silverlight navigation&lt;/I&gt; will update the URL fragment as to not refresh the page.&amp;nbsp;So you could easily run into a nasty URL like this:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.hexadecimate.com/SilverlightStore/Product.aspx?Name=Office+Professional+2007#/Products$Office%20Small%20Business%202007"&gt;&lt;STRONG&gt;http://hexadecimate.com/SilverlightStore/&lt;FONT style="BACKGROUND-COLOR: #ffffcc"&gt;Product.aspx?Name=Office+Professional+2007&lt;/FONT&gt;#&lt;FONT style="BACKGROUND-COLOR: #ffcc00"&gt;/Products$Office%20Small%20Business%202007&lt;/FONT&gt;&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Now we see two pieces of state in the URL; the (1) original deep-link value in the URL query and the (2) updated application state in the URL fragment.&amp;nbsp; We can't change #1 because that would refresh the page so what do we do?&lt;/P&gt;
&lt;BLOCKQUOTE style="BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; PADDING-BOTTOM: 8px; PADDING-LEFT: 8px; PADDING-RIGHT: 8px; BACKGROUND: #fffff0; COLOR: #666; BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 8px"&gt;&lt;STRONG&gt;Aside&lt;BR&gt;&lt;/STRONG&gt;It's worth pointing out that everything in the URL before the fragment can be cleaned up by making use of &lt;A href="http://msdn.microsoft.com/en-us/library/cc668201.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc668201.aspx"&gt;ASP.NET Routing&lt;/A&gt;.&amp;nbsp;Similarly, the URL fragment can be cleaned up by making use of Silverlight &lt;A href="http://www.silverlightshow.net/items/The-Silverlight-3-Navigation-Framework.aspx" mce_href="http://www.silverlightshow.net/items/The-Silverlight-3-Navigation-Framework.aspx"&gt;UriMapping&lt;/A&gt;. &lt;/BLOCKQUOTE&gt;
&lt;P&gt;The answer depends on how important clean URLs and search engine ranking are to you. (If your app is intranet-only, nix the SEO angle.)&lt;/P&gt;
&lt;P&gt;One way to get around this is by doing client-side redirection.&amp;nbsp;On the "Products.aspx" page, we can detect in JavaScript whether or not the client has Silverlight installed and redirect them back to the site root, passing along the deep-link information as a URL fragment.&amp;nbsp;A user who visits such a deep-link might see a brief flash as they are redirected but gains a cleaner URL during the application lifetime.&amp;nbsp;(To avoid the "double-click back" problem, you may want to consider using the location.replace() method.)&lt;/P&gt;
&lt;P&gt;Client-side redirection seems like a great option!&amp;nbsp;So what's the catch? First off, you'll be taking an additional server hit.&amp;nbsp;Second, the user sees a brief flash during redirection.&amp;nbsp;They may even hear the IE "click" sound twice.&lt;/P&gt;
&lt;P&gt;These drawbacks are really very minor if a clean URL is important to you. But there is another point to consider: how such redirection behavior appears to search engines.&amp;nbsp; While client-side redirects are fairly common, you need to tread lightly.&amp;nbsp;&lt;STRONG&gt;The reason being that search engines could &lt;EM&gt;potentially&lt;/EM&gt; view such behavior as &lt;A href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;amp;answer=66355" target=_blank mce_href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;amp;answer=66355"&gt;malicious&lt;/A&gt;&lt;/STRONG&gt;.&amp;nbsp;If that happens, you risk losing traffic and visibility! If you choose to perform redirects, take precautions and avoiding redirecting across domains and ensure that your redirection URL exists in your down-level markup as well.&lt;/P&gt;
&lt;P&gt;Google has &lt;A href="http://www.google.com/support/webmasters/bin/topic.py?topic=8522" target=_blank mce_href="http://www.google.com/support/webmasters/bin/topic.py?topic=8522"&gt;published guidelines&lt;/A&gt; on this and related matters that are worth a read. Unfortunately, there isn't an "official" rule to follow with redirection.&amp;nbsp; When in doubt, make sure that the richer JavaScript and Silverlight experience presents the same content and information seen by down-level clients.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9521627" width="1" height="1"&gt;</content><author><name>waldred</name><uri>http://blogs.msdn.com/waldred/ProfileUrlRedirect.ashx</uri></author><category term="Search Engine Optimization" scheme="http://blogs.msdn.com/b/waldred/archive/tags/Search+Engine+Optimization/" /><category term="Silverlight" scheme="http://blogs.msdn.com/b/waldred/archive/tags/Silverlight/" /></entry><entry><title>Search Engine Optimization for Silverlight Applications – Part 2</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/waldred/archive/2009/03/24/search-engine-optimization-for-silverlight-applications-part-2.aspx" /><id>http://blogs.msdn.com/b/waldred/archive/2009/03/24/search-engine-optimization-for-silverlight-applications-part-2.aspx</id><published>2009-03-25T00:24:00Z</published><updated>2009-03-25T00:24:00Z</updated><content type="html">&lt;P&gt;&lt;A href="http://blogs.msdn.com/waldred/archive/2009/03/23/Search-Engine-Optimization-for-Silverlight-Applications.aspx" target=_blank mce_href="http://blogs.msdn.com/waldred/archive/2009/03/23/Search-Engine-Optimization-for-Silverlight-Applications.aspx"&gt;Last time&lt;/A&gt;, I spoke a bit about the general process of enabling search engines to index content in a Silverlight web application.&amp;nbsp; This time, I’d like to deep-dive into the &lt;A href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=RiaServices&amp;amp;ReleaseId=2390" target=_blank mce_href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=RiaServices&amp;amp;ReleaseId=2390"&gt;SilverlightStore SEO Example&lt;/A&gt; application available online.&lt;/P&gt;
&lt;H4&gt;Overview of the Sample Application&lt;/H4&gt;
&lt;P&gt;The SilverlightStore application is a super simple application that is light on functionality and really intended to provide a clear overview of how to SEO-enable a Silverlight site.&amp;nbsp; It uses Silverlight 3, ASP.NET and the new .NET RIA Services.&lt;/P&gt;
&lt;P align=center&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/waldred/WindowsLiveWriter/SearchEngineOptimizationforSilverlightAp_B85C/image_thumb.png" width=488 height=407 mce_src="http://blogs.msdn.com/blogfiles/waldred/WindowsLiveWriter/SearchEngineOptimizationforSilverlightAp_B85C/image_thumb.png"&gt;&lt;BR&gt;&lt;EM&gt;Figure 1 – screenshot of the SilverlightStore sample application.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;The sample application uses a simple XML file (“/App_Data/Products.xml”) containing information about Microsoft products.&amp;nbsp; This information is used to populate a collection of &lt;A href="http://en.wikipedia.org/wiki/Plain_Old_CLR_Object" target=_blank mce_href="http://en.wikipedia.org/wiki/Plain_Old_CLR_Object"&gt;POCO&lt;/A&gt; Products (via LINQ) that are exposed to our Silverlight client using a .NET RIA Services DomainService.&lt;/P&gt;
&lt;P&gt;The DomainService exposes product information to our Silverlight client and also to our ASP.NET controls (via the DomainDataSource control).&lt;/P&gt;
&lt;P align=center&gt;&lt;IMG style="BORDER-BOTTOM: #eee 1px solid; BORDER-LEFT: #eee 1px solid; BORDER-TOP: #eee 1px solid; BORDER-RIGHT: #eee 1px solid" title="Logical Flow" border=0 alt="Logical Flow" src="http://blogs.msdn.com/blogfiles/waldred/WindowsLiveWriter/SearchEngineOptimizationforSilverlightAp_B85C/image_thumb_1.png" width=508 height=161 mce_src="http://blogs.msdn.com/blogfiles/waldred/WindowsLiveWriter/SearchEngineOptimizationforSilverlightAp_B85C/image_thumb_1.png"&gt;&lt;BR&gt;&lt;EM&gt;Figure 2 – Logical separation of components in the sample application.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;The beauty of this flow is that our content comes from 1 centralized source: the DomainService.&amp;nbsp; One could replace the DAL with ADO.NET Entity Framework, LinqToSQL, nHibernate, etc without breaking the flow.&amp;nbsp; Similarly, one can bring on new clients (such as an AJAX client) and plug those into the DomainService.&lt;/P&gt;
&lt;P&gt;The example application contains a bit of Silverlight code to consume the DomainService and display products and product details—I won’t be getting into those details here*.&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;*Unless one would find it interesting, in which case please do let me know.&lt;/SUP&gt;&lt;/P&gt;
&lt;H4&gt;Generation of Down-Level Content&lt;/H4&gt;
&lt;P&gt;Let’s dig into the good stuff.&amp;nbsp; This application uses the same Master to Content Page relationship described in part one so I won’t dwell on that point.&amp;nbsp; What I do want to review is the use of the ASP.NET DomainDataSource control used to query our DomainService for entities and generate the corresponding down-level content.&lt;/P&gt;
&lt;P&gt;If you crack open the Default.aspx page, notice the use of the DomainDataSource and how it refers to the ProductsDomainService.GetProducts() method.&amp;nbsp; We then use this DataSource control with a traditional &lt;A href="http://msdn.microsoft.com/en-us/library/bb398790.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/bb398790.aspx"&gt;ASP.NET ListView control&lt;/A&gt; to render all of our products inside of the Silverlight &amp;lt;OBJECT&amp;gt; tag defined in the MasterPage.&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;&amp;lt;%&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;@ &lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Register &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;TagPrefix&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="ria" &lt;BR&gt;    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Namespace&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="System.Web.DomainServices.WebControls" 
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Assembly&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="System.Web.DomainServices.WebControls" &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;%&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Content &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="DownLevelContent" 
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ContentPlaceHolderID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="SilverlightDownLevelContent" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server"&amp;gt;
    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;h2&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;Products&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;h2&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;ria&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;DomainDataSource &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="ProductsDomainDataSource" 
        &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DomainServiceTypeName&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="SilverlightStore.ProductsDomainService" 
            &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;SelectMethod&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="GetProducts" /&amp;gt;
    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;ListView &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DataSourceID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="ProductsDomainDataSource" 
        &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DataKeyNames&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Name"&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;LayoutTemplate&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
            &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;ul &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;class&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="product-list"&amp;gt;
                &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;PlaceHolder &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="itemPlaceholder" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server" /&amp;gt;
            &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;ul&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
        &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;LayoutTemplate&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;ItemTemplate&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
            &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;li &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;class&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="product"&amp;gt;
                &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;span &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;class&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="image"&amp;gt;
                    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;a &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;href&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Product.aspx?Name=&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;&amp;lt;%&lt;/SPAN&gt;# Eval("Name")&lt;SPAN style="BACKGROUND: #ffee62"&gt;%&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;"&amp;gt;
                        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;img &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;src&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;&amp;lt;%&lt;/SPAN&gt;# Eval("ImageSmall")&lt;SPAN style="BACKGROUND: #ffee62"&gt;%&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;" 
                             &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;alt&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;&amp;lt;%&lt;/SPAN&gt;# Eval("Name")&lt;SPAN style="BACKGROUND: #ffee62"&gt;%&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;" /&amp;gt;
                    &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;a&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
                &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;span&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
                &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;br &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
                &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;span &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;class&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="name"&amp;gt;
                    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;a &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;href&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Product.aspx?Name=&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;&amp;lt;%&lt;/SPAN&gt;# Eval("Name")&lt;SPAN style="BACKGROUND: #ffee62"&gt;%&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;"&amp;gt;
                        &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;&amp;lt;%&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;# &lt;/SPAN&gt;Eval(&lt;SPAN style="COLOR: #a31515"&gt;"Name"&lt;/SPAN&gt;)&lt;SPAN style="BACKGROUND: #ffee62"&gt;%&amp;gt;
&lt;/SPAN&gt;                    &lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;a&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
                &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;span&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
                &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;span &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;class&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="summary"&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;&amp;lt;%&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;# &lt;/SPAN&gt;Eval(&lt;SPAN style="COLOR: #a31515"&gt;"Summary"&lt;/SPAN&gt;)&lt;SPAN style="BACKGROUND: #ffee62"&gt;%&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;span&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
                &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;span &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;class&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="price"&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;&amp;lt;%&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;# &lt;/SPAN&gt;Eval(&lt;SPAN style="COLOR: #a31515"&gt;"Price"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #a31515"&gt;"{0:c}"&lt;/SPAN&gt;)&lt;SPAN style="BACKGROUND: #ffee62"&gt;%&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;span&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
            &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;li&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
        &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;ItemTemplate&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;ListView&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Content&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;The Default.aspx page renders a product listing that contains links to the Product.aspx product detail page.&amp;nbsp; If you dig into the Product.aspx page, you’ll notice that it uses the DomainDataSource control in a similar fashion but displays &lt;EM&gt;all &lt;/EM&gt;of the product details.&lt;/P&gt;
&lt;P&gt;If you disable JavaScript (or Silverlight specifically), load the Default.aspx page in your browser and notice that the down-level experience provides you with the same content as you’d see in Silverlight.&amp;nbsp; You’re able to review all of the products and dig into the details—you just miss out on some of the fancy transitions and effects.&amp;nbsp; Not only are we making this content indexable by search engines, &lt;STRONG&gt;we’re also broadening our client reach&lt;/STRONG&gt;.&lt;/P&gt;
&lt;H4&gt;Sitemaps and Robots&lt;/H4&gt;
&lt;P&gt;Indexable content is all fine and well … but how do you let the search engines know you exist?&amp;nbsp; An organic approach is to have external sites link to you and search engine crawlers will naturally stumble upon your site and begin indexing it.&amp;nbsp; (In fact, this will happen no matter what you do.)&amp;nbsp; By why leave things to chance?&lt;/P&gt;
&lt;P&gt;If you’re serious about SEO, there are two components you must add to your site:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;A &lt;A href="http://www.robotstxt.org/" target=_blank mce_href="http://www.robotstxt.org/"&gt;Robots.txt&lt;/A&gt; file. &lt;/LI&gt;
&lt;LI&gt;One or more &lt;A href="http://www.sitemaps.org/" target=_blank mce_href="http://www.sitemaps.org/"&gt;XML sitemaps&lt;/A&gt;. &lt;/LI&gt;&lt;/OL&gt;
&lt;H5&gt;Robots.txt&lt;/H5&gt;
&lt;P&gt;The Robots.txt file is used to define directives for search engine crawlers to obey. (Note: they are not &lt;EM&gt;required &lt;/EM&gt;to obey these—but most will.)&amp;nbsp; You can define what user-agents are allowed access to what areas of your site.&amp;nbsp; You can even declare the location of your sitemaps.&amp;nbsp; (We’ll get into sitemaps in a moment.)&lt;/P&gt;
&lt;P&gt;For a real world example of a robots.txt file, I’d recommend you check out Amazon’s robots.txt here: &lt;A href="http://www.amazon.com/robots.txt" target=_blank mce_href="http://www.amazon.com/robots.txt"&gt;http://www.amazon.com/robots.txt&lt;/A&gt;.&amp;nbsp; You’ll notice that it defines a few areas of the site that should not be indexed and also provides some sitemap links.&lt;/P&gt;
&lt;H5&gt;XML Sitemap&lt;/H5&gt;
&lt;P&gt;Sitemaps are used to provide search engines with … well, a map of your site.&amp;nbsp; :)&amp;nbsp; You can define all of the important entry point URLs that you want search engines to index.&lt;/P&gt;
&lt;P&gt;You should definitely provide links to your common entry points in your sitemap as well as additional information to indicate the update frequency and priority.&amp;nbsp; That’s not to say crawlers won’t continue to crawl your site without sitemaps—they will, but using a sitemap allows you to express more information about your site than crawling offers.&lt;/P&gt;
&lt;P&gt;If you look at the “Sitemap.aspx” page inside of the SilverlightStore sample application, you’ll notice that it makes use of the DomainDataSource and an ASP.NET Repeater control that are used to iterate through all of the products and generate XML (conforming to the &lt;A href="http://www.sitemaps.org/protocol.php" target=_blank mce_href="http://www.sitemaps.org/protocol.php"&gt;sitemap standard&lt;/A&gt;) with links to all of the product detail pages.&lt;/P&gt;
&lt;DIV&gt;&lt;PRE class=code&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;&amp;lt;%&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;@ &lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Register &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;TagPrefix&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="ria" &lt;BR&gt;  &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Namespace&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="System.Web.DomainServices.WebControls" 
  &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Assembly&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="System.Web.DomainServices.WebControls" &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;%&amp;gt;&lt;/SPAN&gt; 
&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;ria&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;DomainDataSource &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server"
  &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="ProductsDomainDataSource" 
  &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DomainServiceTypeName&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="SilverlightStore.ProductsDomainService" 
  &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;SelectMethod&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="GetProducts" /&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Repeater &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DataSourceID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="ProductsDomainDataSource"&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;HeaderTemplate&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;urlset &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="http://www.sitemaps.org/schemas/sitemap/0.9"&amp;gt;
  &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;HeaderTemplate&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;ItemTemplate&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;url&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
      &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;loc&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;BR&gt;        &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;&amp;lt;%&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;= new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Uri&lt;/SPAN&gt;(&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.Request.Url,&lt;SPAN style="COLOR: #a31515"&gt;"Product.aspx?Name="&lt;/SPAN&gt;).ToString()&lt;SPAN style="BACKGROUND: #ffee62"&gt;%&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;&amp;lt;%&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;#&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;            HttpUtility&lt;/SPAN&gt;.UrlEncode((&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;)Eval(&lt;SPAN style="COLOR: #a31515"&gt;"Name"&lt;/SPAN&gt;))&lt;SPAN style="BACKGROUND: #ffee62"&gt;%&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&lt;BR&gt;      &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;loc&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
      &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;lastmod&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;&amp;lt;%&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;# &lt;/SPAN&gt;Eval(&lt;SPAN style="COLOR: #a31515"&gt;"LastModified"&lt;/SPAN&gt;)&lt;SPAN style="BACKGROUND: #ffee62"&gt;%&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;lastmod&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
      &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;changefreq&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;&amp;lt;%&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;# &lt;/SPAN&gt;Eval(&lt;SPAN style="COLOR: #a31515"&gt;"ChangeFrequency"&lt;/SPAN&gt;)&lt;SPAN style="BACKGROUND: #ffee62"&gt;%&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;changefreq&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
      &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;priority&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;&amp;lt;%&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;# &lt;/SPAN&gt;Eval(&lt;SPAN style="COLOR: #a31515"&gt;"Priority"&lt;/SPAN&gt;)&lt;SPAN style="BACKGROUND: #ffee62"&gt;%&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;priority&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;url&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;ItemTemplate&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;FooterTemplate&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;urlset&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;FooterTemplate&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Repeater&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;
&lt;H4&gt;Putting It All Together – Deep Links&lt;/H4&gt;
&lt;P&gt;Now we have a Silverlight application with content, the corresponding down-level HTML content, a robots.txt and sitemap to help guide search engine indexing.&amp;nbsp; What’s left?&amp;nbsp; &lt;STRONG&gt;We need a good deep-linking story!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Now that search engines can index the down-level deep-links to our product detail pages, how do we respond to those deep-links if a user visits with Silverlight installed?&amp;nbsp; We need to convey the deep-link information contained in the URL to the Silverlight application.&lt;/P&gt;
&lt;P&gt;We do this in the SilverlightStore application by passing the deep-link information to our Silverlight client by using &lt;A href="http://msdn.microsoft.com/en-us/library/system.windows.startupeventargs.initparams(VS.95).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/system.windows.startupeventargs.initparams(VS.95).aspx"&gt;InitParams&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;If a user arrives at our site via a link like &lt;STRONG&gt;http://&amp;lt;site&amp;gt;/Product.aspx?ProductID=123&lt;/STRONG&gt;, we can handle this inside of the Products.aspx by passing the query information to the Silverlight control.&amp;nbsp; (This is done in the sample application by appending to the SeoSilverlightApplication.InitParams property---but if you’re rendering your own &amp;lt;OBJECT&amp;gt; tag, you’ll want to handle this &amp;lt;PARAM&amp;gt; modification yourself.)&lt;/P&gt;
&lt;P&gt;The InitParams values are treated as a dictionary collection inside of the Silverlight application and you can access these by either listening to the Application.Startup event or by registering your own application service.&amp;nbsp; (The sample application uses an application service called DeepLinkService.)&lt;/P&gt;
&lt;P&gt;The only thing left is to determine how to map URL deep-link information to Silverlight state.&amp;nbsp; In the sample application, we pass the product name as a deep-link and the Silverlight application understands that it must construct it’s own internal XAML Uri to load the product.&amp;nbsp; There are plenty of other ways of doing this such as making use of the HttpRequest PathInfo string in coordination with UriMapping inside of Silverlight 3.&lt;/P&gt;
&lt;H4&gt;Conclusion&lt;/H4&gt;
&lt;P&gt;Once again, we see that using Silverlight 3, ASP.NET and .NET RIA Services together provides a powerful array of tools that can be used to quickly build a compelling Silverlight application that is indexable and discoverable.&lt;/P&gt;
&lt;H4&gt;Resources&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/waldred/archive/2009/03/23/Search-Engine-Optimization-for-Silverlight-Applications.aspx" target=_blank mce_href="http://blogs.msdn.com/waldred/archive/2009/03/23/Search-Engine-Optimization-for-Silverlight-Applications.aspx"&gt;Search Engine Optimization for Silverlight Applications – Part 1&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://silverlight.net/getstarted" target=_blank mce_href="http://silverlight.net/getstarted"&gt;Silverlight 3&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=76bb3a07-3846-4564-b0c3-27972bcaabce" target=_blank mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=76bb3a07-3846-4564-b0c3-27972bcaabce"&gt;.NET RIA Services (March 2009 Preview)&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://code.msdn.microsoft.com/RiaServices" target=_blank mce_href="http://code.msdn.microsoft.com/RiaServices"&gt;.NET RIA Services Sample Applications&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=RiaServices&amp;amp;ReleaseId=2390" target=_blank mce_href="http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=RiaServices&amp;amp;ReleaseId=2390"&gt;SilverlightStore SEO Example (C#)&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.sitemaps.org/" target=_blank mce_href="http://www.sitemaps.org/"&gt;Sitemap Specification&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.robotstxt.org/" target=_blank mce_href="http://www.robotstxt.org/"&gt;Robots.txt Specification&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9505228" width="1" height="1"&gt;</content><author><name>waldred</name><uri>http://blogs.msdn.com/waldred/ProfileUrlRedirect.ashx</uri></author><category term=".NET RIA Services" scheme="http://blogs.msdn.com/b/waldred/archive/tags/-NET+RIA+Services/" /><category term="Search Engine Optimization" scheme="http://blogs.msdn.com/b/waldred/archive/tags/Search+Engine+Optimization/" /><category term="Silverlight" scheme="http://blogs.msdn.com/b/waldred/archive/tags/Silverlight/" /></entry><entry><title>Search Engine Optimization for Silverlight Applications</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/waldred/archive/2009/03/23/search-engine-optimization-for-silverlight-applications.aspx" /><id>http://blogs.msdn.com/b/waldred/archive/2009/03/23/search-engine-optimization-for-silverlight-applications.aspx</id><published>2009-03-24T09:28:00Z</published><updated>2009-03-24T09:28:00Z</updated><content type="html">&lt;style type="text/css"&gt;









.code{font-family:consolas, lucida, courier new, courier;border:1px solid #cdcdcd;padding:5px;background:#f6f6f6;}&lt;/style&gt;  &lt;h4&gt;Introduction&lt;/h4&gt;  &lt;p&gt;Silverlight 3 provides a myriad of reasons to use it for your next rich web application. But one drawback to using Silverlight is that search engines cannot index the content presented by XAPs. This is a deal breaker if you rely on search results to drive traffic to your site. The good news is that there are existing techniques you can make use of to get the best of both worlds: rich user experiences and search engine index-able content.&lt;/p&gt;  &lt;p&gt;Before we get into the good stuff, I want to comment on what it means to make a Silverlight application index-able. In the context of this article, I'm going to speak specifically to techniques that improve search engine visibility but there is another aspect that needs to be taken into account: viable down-level user experiences. What the search engine sees is exactly the same as what users without Silverlight see. I'd strongly advise against going down the path of creating down-level content specifically for search engines--a better approach is to create viable down-level experiences that users without Silverlight can use.&lt;/p&gt;  &lt;h4&gt;Theory&lt;/h4&gt;  &lt;p&gt;Search engines, for the most part, use static analysis of HTTP responses to parse and index page contents. That means when a search engine crawler comes across your Silverlight application, it's only cares about the source.&lt;/p&gt;  &lt;p&gt;When the browser attempts to render a Silverlight &amp;lt;OBJECT&amp;gt; tag but is unable to instantiate the plug-in, it will continue on and render the contents within. If the client has Silverlight installed, they'll see the Silverlight application instead of the HTML content within. &lt;/p&gt;  &lt;div&gt;   &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color: #a31515"&gt;DOCTYPE &lt;/span&gt;&lt;span style="color: red"&gt;html PUBLIC &lt;/span&gt;&lt;span style="color: blue"&gt;&amp;quot;-//W3C//DTD XHTML 1.0 Strict//EN&amp;quot; 
    &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&amp;quot;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;html &lt;/span&gt;&lt;span style="color: red"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;head&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;title&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Silverlight Application&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;title&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;head&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;body&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;div &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;content&amp;quot;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;object &lt;/span&gt;&lt;span style="color: red"&gt;data&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;data:application/x-silverlight-2,&amp;quot; 
              &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;application/x-silverlight-2&amp;quot;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;param &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;minRuntimeVersion&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;3.0.40305.0&amp;quot; /&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;param &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;source&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;ClientBin/MyApp.xap&amp;quot; /&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;div &lt;/span&gt;&lt;span style="color: red"&gt;class&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;down-level&amp;quot;&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;h1&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Down level content goes here.&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;h1&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;p&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet...&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;p&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;div&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;object&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;div&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;body&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;html&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;And that's pretty much it. Want your Silverlight application to be index-able? Put the appropriate down-level HTML markup within the &amp;lt;OBJECT&amp;gt; tag. Easy enough, right?&lt;/p&gt;

&lt;h4&gt;Practice&lt;/h4&gt;

&lt;p&gt;The theory is easy but practice takes a bit of work. We'll use ASP.NET Master Pages to facilitate deep-linkable down-level content.&lt;/p&gt;

&lt;p&gt;Let’s assume we’re building a simple website that display product information. This site has a home page that contains links to “featured” products as well as links to categorical listings of products.&lt;/p&gt;

&lt;p align="center"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="site map" border="0" alt="site map" src="http://blogs.msdn.com/blogfiles/waldred/WindowsLiveWriter/SearchEngineOptimizationforSilverlightAp_A5CE/site%20map_thumb.png" width="352" height="255" mce_src="http://blogs.msdn.com/blogfiles/waldred/WindowsLiveWriter/SearchEngineOptimizationforSilverlightAp_A5CE/site%20map_thumb.png" /&gt;&lt;/p&gt;

&lt;p align="center"&gt;&lt;em&gt;Figure 1 - Example Site Structure.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;One simple approach is to create a MasterPage for your site (similar to the HTML example above) and place a ContentPlaceHolder control within the &amp;lt;OBJECT&amp;gt; tag.&lt;/p&gt;

&lt;div&gt;
  &lt;pre class="code"&gt;&lt;span style="background: #ffee62"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="color: blue"&gt;@ &lt;/span&gt;&lt;span style="color: #a31515"&gt;Master &lt;/span&gt;&lt;span style="color: red"&gt;Language&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;C#&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;...&lt;/span&gt;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="background: #ffee62"&gt;%&amp;gt;
&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color: #a31515"&gt;DOCTYPE &lt;/span&gt;&lt;span style="color: red"&gt;html PUBLIC &lt;/span&gt;&lt;span style="color: blue"&gt;&amp;quot;-//W3C//DTD XHTML 1.0 Strict//EN&amp;quot; 
    &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&amp;quot;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;html &lt;/span&gt;&lt;span style="color: red"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;head&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;title&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Silverlight Application&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;title&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;head&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;body&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;div &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;content&amp;quot;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;object &lt;/span&gt;&lt;span style="color: red"&gt;data&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;data:application/x-silverlight-2,&amp;quot; 
              &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;application/x-silverlight-2&amp;quot;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;param &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;minRuntimeVersion&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;3.0.40305.0&amp;quot;/&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;param &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;source&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;ClientBin/MyApp.xap&amp;quot;/&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;ContentPlaceHolder &lt;/span&gt;&lt;span style="color: red"&gt;ID&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;DownLevelContent&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;server&amp;quot;/&amp;gt;
      &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;object&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;div&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;body&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;html&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Now we can add the following content pages:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Default.aspx – this is our landing page. &lt;/li&gt;

  &lt;li&gt;Products.aspx – this is used to list products. &lt;/li&gt;

  &lt;li&gt;ProductDetails.aspx – this is used to display the details of a particular product. &lt;/li&gt;

  &lt;li&gt;… we could add additional pages if needed, you get the idea… &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The important thing to note is that all of our content pages are now acting to provide down-level content. Users that visit with Silverlight installed will see the Silverlight experience.&lt;/p&gt;

&lt;p align="center"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/waldred/WindowsLiveWriter/SearchEngineOptimizationforSilverlightAp_A5CE/image_thumb.png" width="395" height="173" /&gt;

  &lt;br /&gt;&lt;em&gt;Figure 2 – Master and Content Page Relationship.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;Conclusion&lt;/h4&gt;

&lt;p&gt;With a little bit of elbow grease, it's possible to create a rich Silverlight application that provides a compelling user experience without sacrificing search engine visibility.&lt;/p&gt;

&lt;h4&gt;Resources&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href="http://www.silverlight.net/getstarted/" target="_blank"&gt;Silverlight 3&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9503598" width="1" height="1"&gt;</content><author><name>waldred</name><uri>http://blogs.msdn.com/waldred/ProfileUrlRedirect.ashx</uri></author><category term="Search Engine Optimization" scheme="http://blogs.msdn.com/b/waldred/archive/tags/Search+Engine+Optimization/" /><category term="Silverlight" scheme="http://blogs.msdn.com/b/waldred/archive/tags/Silverlight/" /></entry></feed>