I have a site designed in .net and was wondering how to Automatically Add the "www" Prefix to my domain?

I noticed certain websites have it (Apple.com, MySpace.com, Sitepoint.com). So if a user types in yourdomain.com or any subpages like yourdomain.com/exec-bios/ it would automatically add the 'www' to the prefix