SEO home > SEO Tips > What's the code for url canonicalisation issues for .net


What's the code for url canonicalisation issues for .net

What's the syntax for doing a "catch all" non www to www page variant canonicalisation fix on .net

Posted: 31-10-2008

erik

User Level: SEO Trainee

Member Since: 10-10-2008


Tag on Technorati Submit to StumbleUpon Tag on del.icio.us Bookmark on Yahoo Tag on reddit Digg it Share on Facebook Sphinn

Top Answer

Rating: 5.0/5 (1 vote )

erik

User Level: SEO Trainee

Member Since: 10-10-2008

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

Posted: 11-11-2008



Rating: 0.0/5 (0 votes )

erik

User Level: SEO Trainee

Member Since: 10-10-2008

to answer my own question on iis 7 plus servers the following works as an addition to the web.config file:

<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name=

Posted: 11-11-2008


Rating: 0.0/5 (0 votes )

erik

User Level: SEO Trainee

Member Since: 10-10-2008

where obviously the domain name substitutes for your domain name

Posted: 11-11-2008


Login to subscribe to this question