A few days ago I moved to a new server to host a website. I updated the nameservers and it seems to of pointed it correctly. Now if I type in www before the domain then the website comes up great. If I don’t type www and just do the http:// example dot com, it redirects back to the old server company and shows some ugly weird website that was not ours. Any idea on how to troubleshoot this issue.
Sounds like the non-www version resolves to the IP of your old hoster, which in turn doesn’t recognize the domain and will show Apache default page (which in this case is the ugly website you’re talking about). You add the non-www version to the DNS.
Also take into account that DNS changes may take a while (up until a few days) to propagate properly, so it might be that you’ve set up everything properly, but the changes haven’t propagated yet so you can’t see them yet.