TAG | SEO
Here are some instructions to redirect all requests to http://www.hostname.com to just http://hostname.com. There are a few reasons why you would want to do this, here is a good post explaining some reasons why, and how to redirect from http://hostname.com to http://www.hostname.com. Doing the opposite is just as simple, add this to your web.config:
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect to remove WWW" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www.hostname.com$" />
</conditions>
<action type="Redirect" url="http://hostname.com/{R:0}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
