This could be because of a couple of reasons:
- Your DNS has not propagated yet, meaning if you recently just changed DNS on the domain name give it up to 48 hours and flush cache from your browser.
- The domain DNS is pointing to different IP addresses from your www. or * A records.
- There is a problem with the hosting configuration (unlikely if you are using CPanel or any hosting control panel as this is mostly automated).
Also you should pick either with or without www for consistency and better SEO results. Pick one and stick to it.