Does your favourite website keep changing domain names?

hosts_file_editor
To download these tutorials for OFFLINE viewing or for archive purposes please (Click here to download)
(Clicking the “.zip” will open the Archive, un-zip the .mht files then use one of the plugins below to view them)

You can open .mht WebArchive files directly inside FireFox Or Google Chrome by installing a plugin



Here’s a small guide to help you with your favourite websites keep changing domain names! For example the piratebay has changed domains that many times. It’s hard to keep up right?

Well here’s an idea that i use myself and it works pretty damn well too. And i use it daily. If your using Windows XP/7/8 or any other variant of Windows that uses a HOST file. This should work for you. (As for other OS’s don’t ask I’m a windows only user) so follow this diagram below.

hostfiles otheros
First lets explain what the HOST file does. And how it works on windows based OS’s. Here’s the boring part. So bare with us it’s not too long, but it will help to educate you further.

The hosts file is a computer file used by an operating system to map hostnames to IP addresses. The hosts file is a plain text file, and is conventionally named hosts. In modern operating systems, the hosts file remains an alternate name resolution mechanism, configurable often as part of facilities such as the Name Service Switch as either the primary method or as a fallback method.

The hosts file is one of several system facilities that assists in addressing network nodes in a computer network. It is a common part of an operating system’s Internet Protocol (IP) implementation, and serves the function of translating human-friendly hostnames into numeric protocol addresses, called IP addresses, that identify and locate a host in an IP network.

In some operating systems, the contents of the hosts file is used preferentially to other name resolution methods, such as the Domain Name System (DNS), but many systems implement name service switches, e.g., nsswitch.conf for Linux and Unix, to provide customisation. Unlike remote DNS resolvers, the hosts file is under the direct control of the local computer’s administrator.

The hosts file contains lines of text consisting of an IP address in the first text field followed by one or more host names. Each field is separated by white space – tabs are often preferred for historical reasons, but spaces are also used. Comment lines may be included; they are indicated by a hash character (#) in the first position of such lines. Entirely blank lines in the file are ignored. For example, a typical hosts file may contain the following:

windowshostfilelogo

127.0.0.1  localhost loopback

This example only contains entries for the loopback addresses of the system and their host names, a typical default content of the hosts file. The example illustrates that an IP address may have multiple host names (localhost and loopback), and that a host name may be mapped to both IPv4 and IPv6 IP addresses.

Now you have a little understanding what the host file does right? Well you can simply edit this file yourself. There’s lots of reasons people do this. Lots of anti-spam/malware company’s actually modify the HOST file Adding in 10000’s of IP Addresses weekly. So if your browser one day got hi-jacked, and pointed to a domain name that tried to infect your PC. Instead of that domain name loading,

it would first check the HOST file. If another IP Address was found for that domain name. It would not load the IP Address attached to the original domain name, but actually load the ip address found inside the host file pointing to the anti-malware website etc.

Confused? Don’t be it’s a lot easier than it sounds. here’s an example.

Say there was a website called iamamassivevirus.com which loaded a nasty virus soon as that website page loaded. Now lets say you wanted that website address to point to google.com, to avoid that real domain name from ever loading again. We simply tell our host file that if we typed in iamamassivevirus.com we want this re-directed to google.com

Get the idea now?

So why not use this same idea, when it comes to other websites, like for example thepiratebay, since they keep changing domains. Now regardless what domain name they choose to use, you can always reach them using the same domain name you’ve always used.

For example, this is not their real IP address below, but whenever they change to a new domain name in the future.
Regardless what their domain name is, it could be something like www.ilovethepiratebayrwarrryayapiratelifeforme.com
But as long as you know their new IP address, once you’ve added the following line to your windows HOST file and saved it.

57.593.49.4  thepiratebay.se

Whenever you type in your web browser www.thepiratebay.se it will load up the IP Address you’ve stated in the HOST file. Regardless what actual domain name they’ve now decided to use. (This works i do this for a lot of websites myself)

Cool so how do i edit this HOST file thing?

Well there’s 2 ways. First way is to edit the file using notepad within Windows. (But Since it’s 2014 and not 1984) We are going to make things much easier for you. There’s lots of programs out there that has a nice GUI for this.

hosts_file_editor
One of them being http://hostsfileeditor.codeplex.com visit their website download the free program.
And start simply working with your hostfile (We use their program it’s super simple to use and understand)

Remember though, if your doing this by hand, and not a program you cannot do anything other than

[the IP address you want to visit]  [the name of the domain]

This is why we would suggest anyone who’s going to play with their host file. To use this program instead
As you cannot edit something in the wrong place when using programs that’s designed for this task