the company im working at handle the hosting our self. we got www.domain.com up now and we want to make the domain.com to work as well. we use iis7. i seen some articles and found one with url rewrite setting that can be added to iis7. my question is how whats the best way to go? we dont want to cut any corners we want to do it proper.

As Khaled mentioned, the URL Rewrite method is for search engine optimizations to redirect non-www to www.

To get both URLs (www and non-www) to actually work in the first place, there are two steps needed:

Make sure that DNS accepts both www and non-www (like in your 2nd link)

If you use host headers in IIS, make sure to add both the www and non-www domain names.

I've put together some videos that help explain this and which you may find useful at your company since you are managing this yourself. You can find them at http://dotnetslackers.com/projects/LearnIIS7/. Weeks' 2 and 5 talk about DNS and IIS bindings.

We did change the DNS and the iis Headers but the problem was in our platform provider and their routes so the changes could not take effect. We had the question about the URL rewrite on the table but found a more general solution for us (we got support for 23 countries) instead and did a rewrite script in our squid proxy and we could make it more general that all requests that comes in without the www gets it put infront.