PDA

View Full Version : www or non www issue on my website?



sanuzafar
03-19-2015, 08:09 AM
Basically my website hosting on windows server. I want to know how to solve canonical error.
I know if your website host with apache server you solve this problem through htaccess.

Can any one please help me.

hostbrink
03-20-2015, 11:13 PM
If tyou dont have access. plonk this in your web.config, change from hostbrink.com to your own domain



<system.webServer>
<rewrite>
<rules>

<rule name="CanonicalHostNameRule">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^hostbrink\.au$" negate="true" />
</conditions>
<action type="Redirect" url="http://hostbrink.com/{R:1}" />
</rule>
<rule name="LowerCaseRule" stopProcessing="true">
<match url="[A-Z]" ignoreCase="false" />
<action type="Redirect" url="{ToLower:{URL}}" />
<conditions>
<add input="{URL}" pattern="WebResource.axd" negate="true" />
<add input="{URL}" pattern="Scripts" negate="true" />
<add input="{URL}" pattern="Content" negate="true" />
</conditions>
</rule>
</rules>
</rewrite>
</system.webServer>

rajivdevkk
03-21-2015, 02:40 AM
if your site open with non www, you should .htaccess file or web.config for apache server. you can redirect your site with www using its coding on .htaccess file.

day picnic near delhi (http://www.arounddelhi.net/?page_id=203) | picnic spots in delhi ncr (http://www.conventionindia.in/Daysout.aspx) |

Camp in kanatal (http://www.kanatal.ecoadventurecamp.co.in/)

fakhruddin.ewc@
03-21-2015, 03:29 AM
Use canonical tag for redirect non www to www. Otherwise Google count two web-pages from one web-page and it find same two web-pages and block one web-page.

Spindlow Stuart
03-21-2015, 03:49 AM
Many customers at some point request to force either the www or non-www version of their site to display in their visitor's browser. For example always have www.example.com or simply example.com display in their visitor's web browser. There is a common thought that forcing one format is better for search engine optimization.