Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

This question already has an answer here:

Is there a way to enter a new register to route all the request to myhost.com to www.myhost.com in the dot net panel.

share|improve this question
add comment

marked as duplicate by John Conde Feb 18 '13 at 2:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

I believe the Dot Net Control Panel does not offer this feature and you will need add something like this to your current configuration.

if (!Request.Url.Authority.StartsWith("www"))

{

    string url = string.Format("{0}://www.{1}{2}",

            Request.Url.Scheme,

            Request.Url.Authority,

            Request.Url.PathAndQuery);

           Response.Redirect(url, true);
}
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.