Thanks to the user urielsalis on a different thread on this subject I was able to fix this issue by going into right clicking on notepad, running as administrator, then clicking file; open. I pasted this into the file name bar (%SystemRoot%\System32\drivers\etc\hosts) and then saving.CAUTION I HAVE NOT USED THIS METHOD BEFORE if this does not fix it I would suggest login into the mojang sight, going to games, downloading minecraft. Once you open the installer choose next untill you get to a screen with some options, click the one that says repair and this might fix your problem.
I don't have MCLeaks or AltDispenser and I still get the could not connect to server error. Please help.
Edit: I can log into mojang but not minecraft.net
And have you used one of them before?
I think so. I looked it up in file explorer and it gave me chronium so I deleted that. the other didn't come up.
Thanks to the user urielsalis on a different thread on this subject I was able to fix this issue by going into right clicking on notepad, running as administrator, then clicking file; open. I pasted this into the file name bar (%SystemRoot%\System32\drivers\etc\hosts) and then saving.CAUTION I HAVE NOT USED THIS METHOD BEFORE if this does not fix it I would suggest login into the mojang sight, going to games, downloading minecraft. Once you open the installer choose next untill you get to a screen with some options, click the one that says repair and this might fix your problem.