Can't resolve hostname on minecraft survival game server?

The server I go to goes through periods where it works and then through random periods where it doesn't work. It says "can't resolve hostname" but I have been on this server plenty before so I know the IP address isn't wrong. It is a minecraft survival game server. It's really annoying because I have Wi-Fi connection and bought the game. Help?

Added (1). Also, my friend can get into the server so the server isn't down. I'm really confused…

It's probably your internet speed. If it's great then when it says can't resolve host name just go to direct connect and type in the ip. This works about 99% of the time.