A few different Minecraft issues can be caused by your computers hosts file:
- Authentication servers are down for maintenance when signing in with a Microsoft account.
- Switch to Mojang mode when trying to join servers from a Microsoft account.
- Unable to login to minecraft.net or the launcher, on one device, but can on others.
- Problems purchasing Minecraft.
To fix these issues, follow the steps below to check and clean your hosts file:
1. Open the start menu and search for “Notepad”
2. Choose “Run as Administrator”
3. Click File > Open.
4. Open your Hosts file
- Paste “%SystemRoot%\System32\drivers\etc\hosts” into “File Name” and press enter.
5. Remove any line that contains “mojang”
7. Save the file by clicking File > Save. Then close Notepad.
8. Change the password on your Minecraft account.
You can now restart the launcher and login to your account as normal.
If you still need help, make a post on r/MinecraftHelp and one of us will guide you through the steps.