Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 5.x > Installation and deployment > How to configure a preferred domain ? View modes: 
User avatar
Member
Member
e-abt - 5/22/2012 5:17:14 AM
   
How to configure a preferred domain ?
Hi there !

I'd like to know how I could configure a preferred domain on my Kentico 5.5 R2 website so as to redirect automatically "http://example.com" (www) to "http://www.example.com" (non-www) using a 301 redirection ?

This for SEO purposes (http://support.google.com/webmasters/bin/answer.py?hl=en&answer=93633).

Thanks for your help.

User avatar
Member
Member
kentico_michal - 5/22/2012 6:30:30 AM
   
RE:How to configure a preferred domain ?
Hi,

You can use the domain redirection without the slash (as it is already contained in the relativepath expression) like this:

http://www.example.com{%relativepath%}

Best regards,
Michal Legen

User avatar
Member
Member
e-abt - 5/22/2012 7:21:09 AM
   
RE:How to configure a preferred domain ?
Works perfectly, thanks !