{"id":676,"date":"2012-10-26T15:49:59","date_gmt":"2012-10-26T15:49:59","guid":{"rendered":"http:\/\/jeeskdenny.com\/blog\/?p=676"},"modified":"2012-10-26T15:54:13","modified_gmt":"2012-10-26T15:54:13","slug":"some-superb-uses-of-windows-hosts-file","status":"publish","type":"post","link":"http:\/\/jeeskdenny.com\/blog\/some-superb-uses-of-windows-hosts-file\/","title":{"rendered":"Some Superb Uses Of Windows Hosts File"},"content":{"rendered":"<p>We used to say that the internet has two faces one of good and that of bad. Knowing that websites are backbones of Internet, we may have to block some websites or web services for making a friendly and safer atmosphere among our family, friends, especially easily effective children or adolescents are there. Sometimes, you\u2019ll have to block or unblock (both are interdependent) websites or web services in your office, college or any other places. We used to say a Good Network Administrator should be a good hacker as well because only then he could protect the network from malicious activity. The same fact is applicable for website blocking. You\u2019ve to know how blocking is working and how to block a website in order to unblock a specific website URL or web service.<\/p>\n<p>The base of all these things starts from getting familiar with Windows Host Files and understanding its various possibilities. Windows Hosts file are the head of your computer which helps it to find and connect to a corresponding URL (Domain Name) of an IP Address. When compared to DNS Servers as the DNS servers may be saying that Facebook.com is linked to 19.23.123.12 but you can change it through hosts file. Which means Windows Hosts files can be used for blocking websites and redirecting a specific URL to another one. So, let\u2019s know the real use of Windows Hosts file in order to get more of your network features.<\/p>\n<h2>Edit your Windows Host File<\/h2>\n<p>As said before, making changes to your default networking settings includes a primary step of editing the Windows Hosts file of your PC. But it\u2019ll be quite tedious to do it with notepad so it\u2019s better to install advanced notepad softwares such as Notepad++ along with administrative privileges. For editing the file, first click \u2018Start\u2019, right click on the icon of Notepad++ or any other editor and select \u2018Run as Administrator\u2019.<\/p>\n<p><a href=\"http:\/\/jeeskdenny.com\/blog\/wp-content\/uploads\/2012\/10\/host-file.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-677\" title=\"host file\" src=\"http:\/\/jeeskdenny.com\/blog\/wp-content\/uploads\/2012\/10\/host-file.jpg\" alt=\"\" width=\"526\" height=\"362\" srcset=\"http:\/\/jeeskdenny.com\/blog\/wp-content\/uploads\/2012\/10\/host-file.jpg 526w, http:\/\/jeeskdenny.com\/blog\/wp-content\/uploads\/2012\/10\/host-file-300x206.jpg 300w, http:\/\/jeeskdenny.com\/blog\/wp-content\/uploads\/2012\/10\/host-file-130x90.jpg 130w\" sizes=\"auto, (max-width: 526px) 100vw, 526px\" \/><\/a><\/p>\n<p>After opening Notepad++ with administrative privileges, select option File \u00e0 Open and head to the folder located at C:\\Windows\\System32\\etc. Select Text files filter option from right-bottom of the window. Then open the file named hosts. You don\u2019t have to reboot your PC to make changes as the Windows Host file updates itself when you hit the save button.<\/p>\n<h2>Block a Website URL<\/h2>\n<p>For blocking a specific website URL, you\u2019ve to add the following text in the hosts file.<\/p>\n<p align=\"center\">\u201c127.0.0.1 Example.com\u201d<\/p>\n<p>\u00a0Through adding this phrase, you\u2019re doing such a simple job. You\u2019re saying your PC that the example.com URL is working based on the IP Address 127.0.0.1. So, when you try to navigate to example.com from your PC, DNS will be actually connecting to 127.0.0.1 at instance without searching for the real IP address of example.com. That\u2019s why we said that Hosts file has more privileges than your DNS servers. \u00a0By default, there will be no web servers on your computer and you\u2019ll be seeing a failed message like following.<\/p>\n<h2>Redirecting a Website<\/h2>\n<p>As we said in the introduction, Windows Hosts file can be used for redirecting a specific website to another one. If you think someone of your family is using an unwanted website, you can redirect it to another URL by this. For example, we\u2019re trying to redirect from Facebook.com to twitter.com. For doing this, you want to find the corresponding IP Address of twitter.com which can be got by using the in-built command prompt of Windows. Open Command Prompt and type the command \u2018ping twitter.com\u2019 and you\u2019ll see a IP address. Then add the following section to host file<\/p>\n<p align=\"center\">\u201c199.59.150.39 Facebook.com\u201d<\/p>\n<p align=\"center\"><a href=\"http:\/\/jeeskdenny.com\/blog\/wp-content\/uploads\/2012\/10\/windows.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-678\" title=\"windows\" src=\"http:\/\/jeeskdenny.com\/blog\/wp-content\/uploads\/2012\/10\/windows.jpg\" alt=\"\" width=\"633\" height=\"329\" srcset=\"http:\/\/jeeskdenny.com\/blog\/wp-content\/uploads\/2012\/10\/windows.jpg 633w, http:\/\/jeeskdenny.com\/blog\/wp-content\/uploads\/2012\/10\/windows-300x156.jpg 300w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><\/a><\/p>\n<p style=\"text-align: left;\" align=\"center\">The command forces your PC to go to twitter.com when you type \u2018Facebook.com\u2019 on the address bar. So, you\u2019ll get a simple but effective website redirection.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We used to say that the internet has two faces one of good and that of bad. Knowing that websites<\/p>\n","protected":false},"author":1,"featured_media":678,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[1],"tags":[254,61,253,252,46,255,79,17,251],"class_list":["post-676","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","tag-block","tag-dns","tag-file","tag-host","tag-ip","tag-redirecting","tag-url","tag-website-2","tag-windows"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"http:\/\/jeeskdenny.com\/blog\/wp-content\/uploads\/2012\/10\/windows.jpg","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8gP8w-aU","jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/jeeskdenny.com\/blog\/wp-json\/wp\/v2\/posts\/676","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/jeeskdenny.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/jeeskdenny.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/jeeskdenny.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/jeeskdenny.com\/blog\/wp-json\/wp\/v2\/comments?post=676"}],"version-history":[{"count":3,"href":"http:\/\/jeeskdenny.com\/blog\/wp-json\/wp\/v2\/posts\/676\/revisions"}],"predecessor-version":[{"id":680,"href":"http:\/\/jeeskdenny.com\/blog\/wp-json\/wp\/v2\/posts\/676\/revisions\/680"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/jeeskdenny.com\/blog\/wp-json\/wp\/v2\/media\/678"}],"wp:attachment":[{"href":"http:\/\/jeeskdenny.com\/blog\/wp-json\/wp\/v2\/media?parent=676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/jeeskdenny.com\/blog\/wp-json\/wp\/v2\/categories?post=676"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/jeeskdenny.com\/blog\/wp-json\/wp\/v2\/tags?post=676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}