How to change Windows hosts file

In addition to all the proxies on extensive list we have also created a way for Windows users to simply and effortlessly unblock thepiratebay.se and thepiratebay.org simply by modifying a file on your Windows installation.

Using a Mac? We've got instructions for you too, you'll find them on our Mac hosts file guide page.

Change your hosts file

To do this you need to add the following 8 lines of text to the file c:\windows\system32\drivers\etc\hosts using Notepad.

Windows Vista, 7 and 8 users will need to run Notepad as an administrator to edit the file. To do this click Start, then type in notepad so it searches for it, right click it in the results and choose "Run as Administrator".

Once you've added the 8 lines above to the bottom of the file and saved it, you should try accessing http://thepiratebay.se/. If it works, then everything is configured correctly. If not try rebooting your computer.

To restore your hosts file to how it was before simply open the file in Notepad, delete the 8 lines then save.

How does this work?

Windows uses a hosts file for legacy reasons before DNS was invented. Each computer on the internet has an IP address, including servers. DNS takes a domain name (for example google.com) and turns this into the IP address (such as 173.194.35.169), however if there is a valid entry in the hosts file, your Windows computer will use that before resolving the IP using DNS.

Our servers have been configured to listen on thepiratebay.se and thepiratebay.org and proxy The Pirate Bay's real site. By adding the above 4 lines to your hosts file you are telling your computer to connect to our servers (which aren't blocked by any ISPs) for The Pirate Bay. This means you can now access the real TPB site even if your ISP has blocked it. No proxy servers, VPN, etc. If you manage your own DNS resolvers you can use the same method.