with a few clicks of the mouse
This is a simple way to add a canonical redirect to your website (a 301-redirect from www to non-www or the other way around). It requires console access.
First of all, you need to set up separate entries for the www and non-www version of your website (usually using the host-header setting in IIS). Determine which version you want to redirect (for some help, try this tool to check the numbers on the canonical versons of a domain).
Don't trust the settings - test them with the server header checker. The preferred domain should come normally, the other one should 301-redirect. Try some lower level pages and some parameters in the querystring to be certain that it's working everywhere. It must return code "301" (not 302).
If you do not have console access to IIS, you will have to include a script into all pages / scripts processed on the domain. An example of how to handle this can be found at http://www.jlh-design.com/2006/08/301-redirects-in-asp-on-iis-server/.