> 
> **Possible Duplicate:**  
> 
> [IIS 6 - Setting up 301 redirect for non-www to www for SEO](https://serverfault.com/questions/66708/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"