Getting unknown host error when trying to join MC java (Fixed)

**Edit, for anyone who has the same problem, try changing dns on wifi instead of ethernet **

Earlier today, my sever ip suddenly stopped working, i got unknown host error and everything seemed fine before. So i’ve tried flusing my dns, updating it and it still does not work. This happened once in the past but i fixed it easily, but i can’t figure out what the problem is.