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"

link|improve this question
feedback

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

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

2 Answers

This has been asked and answered repeatedly.

link|improve this answer
feedback

Take a look at:

http://www.xoc.net/works/tips/domain.asp

for Details :

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/41c238b2-1188-488f-bf2d-464383b1bb08.mspx?mfr=true
link|improve this answer
feedback