codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:



Home » ASP » Article

Search engine friendly URLs using ASP.NET (C#.NET)

Article by: Maziar Aflatoun (11/4/2003)
Bookmark us now! Add to Favourites
Email a friend! Tell a friend
Sponsored by: FindMyHosting - Web Hosting Search
Summary: This article describes how one would create a search engine friendly ASP.NET (C# .NET) web site.
Viewed: 18419 times Rating (16 votes): 
 3.8 out of 5
  Rate this Article   Read Comments   Post Comments

Search engine friendly URLs using ASP.NET (C#.NET)



Each year companies and individuals spend millions of dollars on websites that depend on databases to offer dynamic content. Yet these sites never receive the exposure they deserve. Database driven sites are used because their administration is much easier than the sites with static content. Usually, all it takes to update the contents of a database driven web site it making changes to certain tables in the database.

Unfortunately, most of these database driven web sites rely heavily on parameters to display contents since parameter passing is the easiest way to pass information between web pages.

Yet, most search engines cannot or will not list any dynamic URLS. Dynamic URLs are said to contain elements such as ?, &, %, +, =, $, cgi-bin, .cgi. Hence, the pages which the hyperlinks point to will be ignored by the Web spider indexing the site.

I have been searching many top search engines for information on creating a search engine friendly web site using ASP.NET (C#. NET) and have not been able to find anything. So, I thought it would be a good idea to create an article and share it with the rest of the world.

Goal

Instead of sending parameters like
http://www.mydomain.com?pageid=4 which is not search engine friendly

we want to change it to
http://www.mydomain.com/page4.aspx

Prerequisites

In your Global.asax file, modify the Application_BeginRequest event as the following,


Select All Code


In the above code, URLs of incoming requests are scanned to determine if the URL includes “pageX.aspxâ€