Cagdas Double-check the URL in your config.php. If you're going to use WWW, then you need to put it into your config.php's url field.
Basically, Flarum treats WWW as a separate subdomain rather than a redirect, which is different than server behavior. As of yet, Flarum doesn't redirect you or have a workaround, so the best way is to set a server-side redirect from one address to the other so that your users will be directed to the right, working site.