Switch URL to www


I want visitors who access my site via domain.com to be switched to www.domain.com

Is this best done via IIS or DNS and how would I do it in that system?


Who is Participating?
Dan McFaddenSystems EngineerCommented:
It is typically done at the IIS level with URL Rewrite.  Below is a how-to article describing what you need to do.

Reference link:  http://www.dotnetexpertguide.com/2011/08/iis-7-redirect-domaincom-to.html

No need for URL rewrite in that scenario.
URL rewrite can cause conflict with compression, so if they are not needed avoid them.
just create a second website for domain.com and use the http redirect module
skbohlerAuthor Commented:
Since the one site ends up bring forwarded to different domains based on the URL, the URL Rewrite (because it has conditions) seems to be the best choice for us. Thank you!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.