I bought a friend minecraft for the pc, but when he tried to go online an error message was displayed even though he was connected to the internet. Sometimes it is displayed that he has internet and sometimes not, that makes no sense.
Have you already tried restarting the pc?
Yes everything
It may be that his WLAN connection breaks down. So that gives the signal, but no internet.
Yes
Exactly
Also restarted the router?
Think but for a day the internet worked there