So here’s the situation – you have your domain name (ex: mydomain.com) and you want to improve your SEO rankings by redirecting the following two url’s to the same address…. http://mydomain.com and http://www.mydomain.com. So how do you do it on IIS 7 and using an ASP.NET application. FYI – I use a shared hosting (Windows platform) at GoDaddy and this solution works.  The following article best describes it. In a nutshell, you modify your web.config to handle the redirect. Check it out.

http://blogs.iis.net/carlosag/archive/2008/09/02/iis-7-0-and-url-rewrite-make-your-web-site-seo.aspx

Example: web.config

<configuration>
 
<system.webServer>
   
<rewrite>
     
<rules>
       
<rule name=”Redirect to WWW” stopProcessing=”true”>
         
<match url=”.*” />
          <
conditions>
           
<add input=”{HTTP_HOST}” pattern=”^mydomain.com$” />
          </
conditions>
         
<action type=”Redirect” url=”http://www.mydomain.com/{R:0}” redirectType=”Permanent” />
        </
rule>
     
</rules>
   
</rewrite>
 
</system.webServer>
</configuration>

Now when you hit http://mydomain.com you will be redirected to http://www.mydomain.com and your SEO rankings will not take a hit for having two ambiguous addresses.  I hope this helps!

{ Comments on this entry are closed }

WordPress Headway Theme Log In Page Error

November 24, 2009

Real quickly – If you’ve installed the Headway Theme into your WordPress Blog web site and once you’ve left the dashboard you can’t get back in…. here’s what to do…
Log back in – and when you click the “Log In” button if it brings you back to the Log In page… here’s the trick…. You [...]

Read the full article →

LINQ Join Error – Join Clause is Incorrect

November 9, 2009

This is a relatively ambiguous error that seems to pop up frequently when first learning LINQ. It took a lot of hunting around on the web to finally come up with an appropriate response to what the issue is. Here’s a link to the article that I found most useful.
http://social.msdn.microsoft.com/Forums/en-US/linqprojectgeneral/thread/bf98ec7a-cb80-4901-8eb2-3aa6636a4fde
Basically, in LINQ, you [...]

Read the full article →

WordPress Email Configuration

November 8, 2009

Here is a link to the best article I found for how to setup your email (for a “Contact Us” page) in WordPress.
http://angstrey.com/index.php/2009/07/20/contact-form-7s-failed-to-send-your-message-error/

Read the full article →

Oracle Stored Procedure Parameter Order

July 30, 2009

Weirdest solution I had to learn the hard way….
Oracle ODP Provider for .NET likes to have the parameters of the OracleCommand object added in the same order as they appear in the declaration of the stored procedure (Package/Package Body) in the database.
Oracle will throw ambiguous errors regarding datatypes not matching or missing arguments – it’s really [...]

Read the full article →

DotNetNuke and GoDaddy – Install into Root Folder for better SEO

July 26, 2009

Yes, while it’s true that Godaddy requires that you place DNN in a sub folder off the root of your site it is NOT necessary in my opinion and CAN BE changed.  When you go through their install process do as they require, And then run through the DNN install Wizard – just as you [...]

Read the full article →

Excel Tips

July 1, 2009

Best source of Excel tips and techniques.

Read the full article →