What happens when you try to access your website as http://example.com? You get an error? Is it redirecting to www?
First of all I would check the DNS configuration just to be sure that both example.com and www.example.com point to the same ip address.
Then if you use apache you could redirect the www version of your website to the non-www version using rewrite rules in .htaccess
If you use nginx you have to add these rewrite rules in the nginx config for that vhost.
I think you need to provide more details about your actual configuration, what have tried by now and so on in order to get help.
UPDATE: For IIS configuration I think you should check this link:
iis url redirect http to non www https