Yes, the solution is to check the DNS settings. Your new internet provider has likely given you a new router or router - modem. The router probably has been pre-programmed with their DNS servers. You can change those, however, to ones of your choice.
Open System Preferences, Network on the iMac. Click on the "advanced" button at the bottom right. Now click on the DNS tab at the top. Copy down what it says and post it back here in your reply. Note... the numbers may be grayed out, but that's OK. Post it anyway.