This issue has nothing to do with Discourse and it’s about your domain DNS records. From your description it looks like you have an A record for the subdomain www pointing at the IP address where you’re hosting Discourse, which is different to the root domain (usually an A record with the name @). I’ve never used GoDaddy, so it’s better if you browse through their help section unless somebody else here can help you out.