Changing .aspx files to .htm

By leen3o on Feb 23 2009 | 3 Comments

In our CMS I have a custom URL rewriting module that creates SEO friendly URLS based on the users page name.  This was great and worked well, but I have noticed over the past couple of years that even though Google say they treat .aspx, .php extensions the same as static .htm pages - .htm pages just seem to do better in the SERPS for the sites I have managed.

So I went about trying to find out a way of auto changing the extension to .aspx to .htm, well after a while I realised I was being a plank – The easiest and quickest way to go about it was to use the fantastic ISAPI rewrite 3 and make the site treat .htm extensions as .aspx files.  I slapped this in ISAPI and VOILA! Works a treat..

RewriteEngine on
RewriteRule ^(.*)\.htm $1\.aspx

Hope this helps someone else

Post info

Tags: ,
Categories: ASP.NET

Comments

Anthony Grace on 2/23/2009 5:57 PM Do you have some sources for the SERPS for htm over aspx stats? I find this very interesting...

Anthony Smile
lee on 2/23/2009 6:17 PM Hi Anthony

Sorry no sources, just my own experience of running several sites and online stores.  I might just be a huge coincidence that the sites/stores with the .htm extension seem to do really well in the SERPS, but I'm not taking any chances Smile
Anthony Grace on 2/23/2009 6:31 PM Thanks, I have always kind of suspected that. Maybe the new canonical tag might change all that?

www.codersbarn.com/.../...d-the-Canonical-Tag.aspx

One can hope....

Anthony Smile