Does that article apply to this issue? If i carried out those instructions in IIS wouldnt that redirect site1 and site2 to the one site that i set as the main site?
What i did was add two canonical rules and got the error "Too many redirects"
rule 1 - selected the site, under URL Rewrite > Add rule, selected site 1
rule 2 - selected the same site, under URL Rewrite > Add rule, selected site 2
Canonical URLs
Umbraco v6.
I have one Umbraco installation with two sites. Second site was added under the "Culture and Hostnames" options.
Under Site 1 Culture and Hostnames is empty but controlled by IIS. Under Site 2 Culture and Hostnames has http://site2.com
When a user navigates to http://site1.com they reach site 1.
When a user navigates to http://site2.com they reach site 2.
So all works as expected.
Is there anyway to add canonical domains so that
http://site2.com changes to http://www.site2.com
http://site1.com changes to http://www.site1.com
Note the www for each URL.
Is this possible to keep the functionality as is but with the changes mentioned above?
Please refer the below link which help you to achieve the above goals :
http://www.wiliam.com.au/wiliam-blog/web-design-sydney-enforcing-a-canonical-domain-in-iis-for-seo-performance
Does that article apply to this issue? If i carried out those instructions in IIS wouldnt that redirect site1 and site2 to the one site that i set as the main site?
Yes, you can apply it to this issue.
I think if you apply this rules then it will not redirect to http://site1.com. It will redirect you to http://www.site1.com.
What about site2? If add that rule what would happen if the user types in http://site2.com?
Remember there is 1 IIS site 1 Umbraco installation and 2 sites in this 1 installation which point to two different websites.
You have to create a new rule for site2 like site1.
You can create a number of rules for one site.
What i did was add two canonical rules and got the error "Too many redirects"
rule 1 - selected the site, under URL Rewrite > Add rule, selected site 1 rule 2 - selected the same site, under URL Rewrite > Add rule, selected site 2
Any further thoughts?
Hi J,
You need to write the below two rules in the web.config file if you want to redirect site1.com to www.site1.com and site2.com to www.site2.com :
I have tested the above two rules on local site and its working fine for me.
Thank you - this did the trick
This can be simplified to:
is working on a reply...