Open whole website using www forcibly.

ANKIT MISTRY asked on March 9, 2015 22:52

Hello,

I want to open my whole website with www only. i tried in CMSSiteManager>Sites>(select site) in the General tab change the domain to read www.< yourdomain >.com vs. < yourdomain >.com. Then add an alias with < yourdomain >.com without the www. These two items aren't required but it helps keep things clean.

but it is allowing to open my website without www like i write mydomain.com it is opening without www, but i need to open with www.mydomain.com if i write mydomain.com.

Can anyone advise.

Thanks Ankit

Recent Answers


Stephen Rushing answered on March 9, 2015 23:12

Try putting the www URL in the Redirect URL field of the domain alias.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on March 10, 2015 12:34

You've done 2 of the three steps. If you want www, always ensure www.domain.com is listed in the site definition and domain.com in your alias (as you have) and not the other way around. The last step is to go to Settings>URLs & SEO>SEO - URLs>Process domain prefix and set to "always use domain with WWW prefix". This will force your domain to use WWW.

Keep in mind if you're still in dev, and have a subdomain you'll want to set this to "leave domain as is" otherwise you'll never get to you subdomain.

1 votesVote for this answer Mark as a Correct answer

ANKIT MISTRY answered on March 10, 2015 15:16

Hello Brenden,

I am using Kentico 6.0 and i am not getting these options there, the only option i can see is "Default URL path prefix".

Can you please advise.

0 votesVote for this answer Mark as a Correct answer

Martin Danko answered on March 11, 2015 04:01

Hello Ankit,

Yes, this setting was not present in Kentico 6, therefore at this point you have 2 options:

  1. Upgrade to Kentico 7 and take a benefit of Search engine optimization
  2. Handle this using URL rewrite rules

Regards, Martin

0 votesVote for this answer Mark as a Correct answer

ANKIT MISTRY answered on March 11, 2015 20:06

Thank You Martin, lets see what i can do

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.