Possible Duplicate:
IIS 6 - Setting up 301 redirect for non-www to www for SEO

What would be the best way of achieving a redirect from, lets say site.com to www.site.com on a windows server? I have access to the dns server also, if anything could be done there to help it along.

I know you could do it by code (asp.net, php etc on your site) but i am wondering if it is possible only using iis and/or dns setup?

I see alot of sites using it these days, so was beginning to wonder :-) Also if you enter "site.com/thispage.html?1=2" it should redirect to "www.site.com/thispage.html?1=2"

marked as duplicate by splattne Feb 17 '10 at 20:56

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.


This has been asked and answered repeatedly.


Take a look at:


for Details :