asp.net 4 SEO optimization to improve site rankings and weights

Source: Internet
Author: User
Tags contains net new features

ASP.net 4 includes a series of new run-time features that can help you further optimize your site. Some of these new features can be used to optimize SEO to improve the rankings and weights of Web sites in search engines, including:

New Page.metakeywords and Page.metadescription properties

New URL-oriented support for ASP.net Web forms

The new Response.redirectpermanent () method

Here's how to use these features to further improve the details of search engine dependencies.

Page.metakeywords and Page.metadescription Properties

A simple suggestion to improve the relevance of web search is to make sure that you always have the "keywords" and "description (description)" <meta> logos in your HTML for the

A good improvement in asp.net 4 Web forms is the addition of 2 new properties to the page class: Metakeywords and Metadescription, which make it easier and cleaner to set these values programmatically in the background code class.

The

Here is a simple snippet of code that demonstrates how to set these properties programmatically in the Page_Load () event handler function:

In addition to setting keywords and description attributes programmatically in the background code, you can now set them declaratively in the @page instructions at the top of the. aspx Web page. The following code fragment demonstrates what to do:

As you can expect, if you set these values programmatically, they override any values declared in the

asp.net URL-oriented in Web forms

URL-oriented is one of the first features we introduced in ASP.net 3.5 SP1, which has been used for ASP.net MVC applications to show a clean, SEO-friendly "web 2.0" URL. URL-oriented allows you to configure an application to accept request URLs that are not mapped to physical files, and you can use the Guide to define URLs that are semantically more meaningful to the user, and these URLs help search engine optimization (SEO).

For example, a URL to a traditional Web page that displays product classifications might look like this:

Http://www.mysite.com/products.aspx? Category=software

Using the URL-oriented engine in asp.net 4, you can now configure the application to accept the following URL to display the same message:

Http://www.mysite.com/products/software

In ASP.net 4.0, URLs like the above can now be mapped to asp.net MVC controller classes, or to Web pages based on ASP.net Web forms. You can even have an application that contains Web Forms and MVC controllers that map URLs between them using a single set of guide rules.

Response.redirectpermanent () method

Over time, moving Web pages and other content between Web applications is extremely common, but can lead to the accumulation of failed links in search engines.

In asp.net, developers often use the Response.Redirect () method to programmatically transfer requests for old URLs to new URLs. But what many developers do not realize is that the Response.Redirect () method sends an HTTP 302 Found (temporary turn) reply that causes an extra HTTP round-trip when the user attempts to access the old URL. Search engines generally do not follow multiple redirect jumps, meaning that using a temporary turn will negatively affect your page rankings.

ASP.net 4 introduces a new response.redirectpermanent (string url) helper method that can be used to make an HTTP 301 (permanent redirect) redirect. This causes the search engines and other user agents that recognize permanent redirection to save and use the new URLs associated with the content. This will make your content indexed and your search engine page rankings improved.

Here is an example of redirecting to a specific URL using the new Response.redirectpermanent () method:

ASP.net 4 also introduced a new Response.redirecttoroute (string routename) and Response.redirecttoroutepermanent (string routename) helper methods , which can be used to make temporary or permanent redirection through the URL-oriented engine. The following code fragment demonstrates how to issue a temporary and permanent redirect to a named path registered in a URL-oriented system (the path accepts a category parameter).

You can use the paths and methods above for both ASP.net Web forms and URLs based on ASP.net MVC.

Conclusion

asp.net 4 contains a stack of feature improvements to facilitate the construction of the ultimate SEO-oriented public-facing web site. You should be able to use these features to increase the flow of users to your site, hopefully directly or indirectly to increase the revenue you get from it.

This article is reproduced from Scott Guthrie's blog,

Original address: Http://blog.joycode.com/scottgu/archive/2010/01/06/115842.joy



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.