Here are 6 ways to try to fix this: https://www.hostinger.com/tutorials/err_name_not_resolved
You say you flushed the DNS -- make sure you follow the instructions to the letter. If you leave a device connected, it can poison the DNS again. To clear a possible DNS problem:
1. Turn off all of the devices using the modem (all phones, iPads, computers, etc.)
2. Unplug the modem's power from the wall socket.
3. Wait a minute, then plug the modem back in.
4. Wait about 5 minutes after all the lights on the modem are back on, then turn all your devices on one-by-one.