Example :- Redirecting Facebook to clicknsnap.org
Open a command prompt (click on Start and type in CMD) and type in the following command:
In my example, I pinged clicknsnap.com.
The IP address is 188.8.131.52.
Now I can simply plug that number into my hosts file in front of www.facebook.com as explained below.
Locating Host file (C:\WINDOWS\system32\drivers\etc )
- Open Windows Explorer and click on This PC or My Computer.
- Double click on C drive ( or the drive in which windows is installed),
- Open Windows
- Open System32
- Open the folder drivers.
- Open the folder “etc”
- You’ll now see several files, one of which is hosts.
Editing the Hosts file
- Click on the hosts and open it in a notepad
- Goto the last line which will say something such as ‘127.0.0.1 localhost’ or ‘::1 localhost’.
- Place the cursor at the end of the last line, Press Enter to create a new line.
(As shown in Image)
- if I wanted to block a website like www.instagram.com, I could just add the following line:
- Continue to add the websites you wish to redirect to clicknsnap.org, each prefaced with 184.108.40.206 and a space.
- Click File, Save to commit to your changes. Dismiss any warnings from windows or any other antivirus programme. which may be triggered by your editing of the hosts file.
- Close any open browser windows, and then reopen a browser to test your edits. The redirected sites should redirect you to your desired website.