I did a Google search for
non www to www iis[
^] and the very first link had an answer.
Copying the solution from the link -
Add below rule element to you web.config file:
<rule name="Redirect to WWW" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^your.domain.name$" />
</conditions>
<action type="Redirect" url="http://www.your.domain.name/{R:0}" redirectType="Permanent" />
</rule>
Please do search before you ask.