New features in ASP.NET 4 for search engine optimization.
- Page.MetaKeywords and Page.MetaDescription properties
- URL Routing support for ASP.NET Web Forms
- Response.RedirectPermanent() method
Now with ASP.NET 4 web forms we can easily add MetaKeywords and MetaDescription in code behind classes. We can now set keywords and description programmatically.
Below is a simple code snippet that demonstrates setting these properties programmatically within a Page_Load() event handler
URL Routing support for ASP.NET Web Forms
URL routing was a capability we first introduced with ASP.NET 3.5 SP1, and which is already used within ASP.NET MVC applications to expose clean, SEO-friendly “web 2.0” URLs. URL routing lets you configure an application to accept request URLs that do not map to physical files. Instead, you can use routing to define URLs that are semantically meaningful to users and that can help with search-engine optimization (SEO).
For example, the URL for a traditional page that displays product categories might look like below: URL routing was a capability we first introduced with ASP.NET 3.5 SP1, and which is already used within ASP.NET MVC applications to expose clean, SEO-friendly “web 2.0” URLs. URL routing lets you configure an application to accept request URLs that do not map to physical files. Instead, you can use routing to define URLs that are semantically meaningful to users and that can help with search-engine optimization (SEO).
http://www.mysite.com/products.aspx?category=software
Using the URL routing engine in ASP.NET 4 you can now configure the application to accept the following URL instead to render the same information:
http://www.mysite.com/products/software
Response.RedirectPermanent() method
It is pretty common within web applications to move pages and other content around over time, which can lead to an accumulation of stale links in search engines.ASP.NET 4 introduces a new Response.RedirectPermanent(string url) helper method that can be used to perform a redirect using an HTTP 301 (moved permanently) response. This will cause search engines and other user agents that recognize permanent redirects to store and use the new URL that is associated with the content. This will enable your content to be indexed and your search engine page ranking to improve.
Below is an example of using the new Response.RedirectPermanent() method to redirect to a specific URL:
Related posts:
Differences Between IIS URL Rewriting and ASP.NET RoutingSEO with ASP.NET 4.0 Framework
No comments:
Post a Comment