de-Hao! [ How it's done! ]

How it’s Done!: SEO & URL Rewriting with ASP.NET (Part I)

Posted by: de-Hao on: June 12, 2008

URL Rewriting has been around for a moment or two. It is not just an SEO mandate; it is the “Web x.0″ way! In today’s web world, as we know it, web developers are obligated to use “clean URLs” and/or employ some form of URL Rewriting solution prior to deploying public facing sites to production environments. In fact, if your marketing department or web strategist is not yelling at you for this, they are probably “slacking”!

The PHP folks have been quite successful at using “mod_write”, “mod_spelling”, and “mod_negotiation” (in the Apache world) to create and maintain rich SEO (search engine optimization) friendly URLs (aka “clean URLs”). That notwithstanding, a few solutions exist for crafting clean URLs in the ASP.NET world. Almost a year ago, I had the pleasure of writing a custom “HttpModule” and “HttpHandler” that intercepted 404 errors in the IIS request pipeline and subsequently performed both extension-based and extension-less URL (”folder”) redirects. Though this solution worked for the client I was working for at the time, it had a few limitations. My goal here is, to share some of the key guidelines I have gone native with, quite recently, for creating rich SEO friendly URLs – particularly for those of us who are guilty of drinking the .NET “kool-aid”! Read on, kid!!!

Huh!?!?! Clean URLs? What is that?

If you’ve used a CMS package like Ektron CMS400.net, DotNetNuke or heck any dynamic website lately, you’ve probably seen or created “dirty URLs” like “http://www.dirtyurl.com/cgi-bin/gen.pl?id=554&y=whyme” or something like “http://www.imnotseofriendly.com/prd.aspx?id=377&k=ilovejelly&p=letsstopthismadness”. These URLs are not pleasant looking. They are “DIRTY-DIRTY”! As much as you hate looking at them, search engines abhor them. More so, as we approach the semantic web eon, clean URLs like “http://www.cleanurl.com/imnicelikethis.aspx” or better yet “http://www.cleanurl.com/im-nicer-like-this/” are more fitting.

Ok, enough said! Or not! Let’s spill! What are dirty URLs?

According to SEO Consultants, dirty URLs are complex, hard to read, and usually plagued with characters and identifiers that are typically irrelevant to the average web user.

Some characteristics of dirty URLs include:

  • Difficult to remember and type in a web browser
  • Do not prop up usability
  • Pose a security risk
  • o hackers can modify the QueryString which follows the “?” for front-door attacks;
  • o exposing the web site’s development platform through the file extension (eg. “.aspx”, “.php”, “.jsp”) also reduces the surface area for web attacks
  • Could leave broken links on a site when the underlying technology or folder structure is changed (eg., if you decide to switch from Java to .NET, all bookmarks pointing to your “.jsp” links will be broken). Rule of Thumb: “Good URLs don’t change”!

 

Characteristics of Clean URLs include:

  • Remove QueryStrings via URL Rewrites
  • Remove file extensions from URLs and source files (via URL Rewrites and/or Content Negotiation)
  • Cater for guessable and “keyword-rich” URLs via URL Rewrites
  • Cater for URL spelling errors (by running 404 requests through a URL spell checker)
  • Cater for host name typos (ie. add “w”, “ww”, “www”, “wwww”, “.” to the site’s DNS map)
  • Cater for possible domain name “fat finger” typos (ie. buy some synonymous domain names)
  • Use short but meaningful URLs (eg. “/services” instead of “/s” or “/the_products_we_carry”)
  • Steer clear of punctuation – use hyphens (”-”) instead of the underscores (”_”) — underscores might be hard to notice
  • Don’t expose the development technology through folder names and file extensions (eg. use “scripts” instead of “js” or “styles” instead of “css”; use folder redirects instead of exposing “.aspx” extensions)
  • Use a consistent case (preferably, lower-case) and address case-sensitivity issues

 

Hopefully we can all secure and make our web applications more SEO Friendly!

Keep an eye out for Part II of this series, where I share some excellent solutions for .NET developers.

Further Reading:

Check out the following articles on this subject:

John Heard – How URLS Can Affect Top Search Engine Rankings

SSW – Rules to Better Google Rankings

Powell T. & Lima J. – Search Engine Friendly URLs – URL Rewriting

Tim Berners Lee – Cool URIs don’t change

Jakob Nielsen – URL as UI

Scott Guthrie – Tip/Trick: URL Rewriting with ASP.NET

Scott Mitchell – URL Rewriting in ASP.NET

5 Responses to "How it’s Done!: SEO & URL Rewriting with ASP.NET (Part I)"

nice news and tips about seo services!

Thanks, this is very helpful!!!

Leave a Reply

About Moi!


twitter

linkedin


de-Hao! is a seasoned IT Consultant with a strong interest in all iterations of the Web, as we know it! He currently works as a Senior Web Developer and Adjunct Instructor in the Greater Milwaukee WI area.

My Tweets!

  • Gift or ultimate Curse? pump it out like it's going outta style... [7pm - 2am : GO TO TOWN! DO DAMAGE!! AND CRUSH IT!!!] --itz.all.hrs.sht 2 days ago
  • in the "gold rush of branding" - "Patience & Passion"! Acute hassle! Authenticity! Garner equity! Can't stop now.. "legacy" > "currency"... 2 days ago
  • ...shopping spree downtown chitown -- next stop: taste of Chicago! 1 week ago

 

June 2008
M T W T F S S
« Apr   Jul »
 1
2345678
9101112131415
16171819202122
23242526272829
30