4:55 pm - Thursday February 9, 2012

Block Websites using DNS

  • Share
  • Share

Do you want to know how to block a website without using any software or without using Browser inbuilt security. Well here is a much secure and hard to find out way of blocking websites.

How does DNS Website Blocking Work ?

The TCP/IP protocol in Windows contains a file called “hosts“  that contains the mapping of the website to a particular IP address. Whatever DNS address you may use in your router or modem or your TCP/IP properties in Network Connection, they will be overridden by the IP mapping done in this “host” file. So by simply mapping any website to a dummy IP we can block the particular website from loading in the browser.

How to block a website using DNS

  1. Open the folder “C:WindowsSystem32Driversetc
  2. In that folder you can find a file by the name “hosts“, right click on the file and open it with notepad or any other text editor.

    dns Block Websites using DNS

    IP Mapping

  3. As in the above show image, the last lines represents the IP mapping, so add the IP address “127.0.0.1″ followed by the website that you want to block.
  4. The address “127.0.0.1″ is the localhost address, (you can specify any other dummy IP in that place if you want to )
  5. Save the File
  6. Restart your Browser and now you can find that the website you have added will fail to load.

How to check if a website is blocked by DNS

There are many ways by which you can find whether a website has been blocked to you or not. Following are some of the methods by which you can find out.

Direct Host File Lookup

Nothing can be much easier than this method, to check the website is blocked by DNS or not, just open the host file specified in the folder “C:WindowsSystem32Driversetc” , However administrators are smart enough, they would have already restricted you from viewing the System Files, In those cases you got to try the following methods.

Down for Everyone Or Just Me

This is one of the mostly viewed website to detect if a website is not available just to you or to everyone. Enter the website that you want to check and there you can find out if the site has been blocked. However this method cannot precisely determine if its blocked because of the DNS. There may be several ways by which ca website can be blocked ,DNS is one such way.

IP Lookup

Since DNS methods maps the website to some dummy address, whenever you ping the website, it in return pings the IP that has been mapped to it. Open Command Prompt and type  “ping“  followed by the website name. This will show the IP that been associated with it. Comparing it to the original IP you can find if the site has been blocked by DNS or not.

Open a Blocked website

If you cannot get a chance to edit the IP mapping table, you can still open the blocked website using proxy websites. HideMyAss is one such proxy website viewer, that can help you in this case.

hide my ass Block Websites using DNS

HideMyAss

pixel Block Websites using DNS

Loading
Filed in: Tutorials

49 Responses to “Block Websites using DNS”

  1. March 2, 2010 at 12:30 pm #

    Nice information ram. Just now i have tried this it’s working but if i use http:// site is coming why

    • March 2, 2010 at 12:57 pm #

      Ya i missed to say that: when you want to block a site say ” facebook” then you got to add this variation also

      127.0.0.1

      http://www.facebook.com

      Then it will block, its due to the variation in DNS lookup. And thanks for trying it :)

  2. March 2, 2010 at 12:40 pm #

    I have tried this when i use to be an system admin in my comp an dused to play with the ppl.. This is dumb funny and easiest way to block the sites at system level..

    OffTopic: Dude new theme seems to be good but is there any any particular reason to choose such a big font at the the home page.. IMO it is not looking good..

    • March 2, 2010 at 1:07 pm #

      I wanted to experiment with the font sizes dude, My team mates wanted a big font in the homepage, Which actually worked, Im getting more page views than before. The font appears big for me too as Im using a 1024 x 768 14″ monitor :D .

  3. March 2, 2010 at 4:12 pm #

    Nice information. Thanks for sharing. Theme looking good.

    • March 2, 2010 at 4:16 pm #

      Thanks Pavan, I changed it on Feb 28, just for a change., Optimized it well to load very fast. :)

  4. March 2, 2010 at 8:13 pm #

    Of course great idea and I think we can use this for other things also.

    However in Vista and 7, you can not save the edited host file as said above, required administrative rights.

    • March 2, 2010 at 9:38 pm #

      Oh Yes , they have brought down that restriction, But dont worry mate, its windows , they always have loop holes :D

  5. March 3, 2010 at 11:34 am #

    Comment Testing !!!

    • March 3, 2010 at 11:35 am #

      this is the reply comment

  6. March 3, 2010 at 1:38 pm #

    very useful info friend , downforevryoneorjustme is so useful , i always use it

    • March 3, 2010 at 4:35 pm #

      Thanks Saif, Talking about Down-for-evryone-or-just-me , its really awesome web app. I earlier used to access through proxies to see if they are loading, but after finding this site, just using this to check.

  7. March 3, 2010 at 7:13 pm #

    I’m yet to face a situation when I will want to block a website using DNS. Cool tip, nevertheless! :)

    • March 3, 2010 at 7:22 pm #

      Thanks Dude :)

  8. March 4, 2010 at 1:20 pm #

    Nice work bro…. Hey, do you know about any desktop tool which we can use to access blocked websites rather than going to proxy sites? I want to view one of my friend’s blogs, but unfortunately its blocked! :(
    .-= Pubudu Kodikara´s latest blog ..Stand a Chance to Win a Free BitDefender Anti Virus Subscription =-.

    • March 5, 2010 at 4:54 pm #

      I will mail you the links for the proxy softwares, None are free, No problem we have loads of cracks around :D

    • March 6, 2010 at 9:34 am #

      Hehe…. thanks buddy :D
      .-= Pubudu Kodikara´s latest blog ..Stand a Chance to Win a Free BitDefender Anti Virus Subscription or A Copy of 31 Days to Build a Better Blog =-.

    • March 6, 2010 at 3:12 pm #

      Sure mate, I like the BitDefender Free Subscription Contest. I reckon this is the first contest on TechHamlet, so best wishes mate :)

  9. March 5, 2010 at 4:48 pm #

    Great tips here… I am using other tool though, but you add something new to me…
    .-= Cebu Tech Blogger´s latest blog ..Why I am Blogging? =-.

    • March 5, 2010 at 4:55 pm #

      Thanks Cebu., Welcome to ByteChip :) Will love to have your presence in the future. Cheers

  10. March 5, 2010 at 5:07 pm #

    As always be… I actually visited here before, but forgot to subscribe for the updates. My bad… Anyway, thanks and you’re welcome too.
    .-= Cebu Tech Blogger´s latest blog ..Why I am Blogging? =-.

  11. March 6, 2010 at 2:25 pm #

    Thanks for sharing. I will play with this in my office
    .-= NavaPavan´s latest blog ..Websites That Tweet Your Blog Posts Automatically To Twitter =-.

    • March 6, 2010 at 3:11 pm #

      My pleasure mate, Do subscribe to our Feeds to get our latest updates, Thanks for Visiting . Have a great day:)

  12. March 6, 2010 at 2:56 pm #

    I love this trick. It can actually be used for playing pranks or also for restricting some NSFW sites
    .-= Tech-Freak Stuff´s latest blog ..LG Cookie pep: The Complete Review =-.

  13. March 7, 2010 at 2:21 pm #

    That is a terrific article, really easy to understand. Thanks for making time to give your own feelings.

    • March 7, 2010 at 3:41 pm #

      Thanks mate :)

  14. March 8, 2010 at 10:47 pm #

    Hey very nice blog!! Man .. Beautiful .. Amazing .. I will bookmark your blog and take the feeds

    • March 8, 2010 at 10:49 pm #

      Thanks a lot Dude, Im really very happy that you liked my blog. Welcome to ByteChip on behalf of my Team. Have a great day :)

  15. April 2, 2010 at 9:22 am #

    You taught me something new today.. now will play around
    .-= Chethan´s latest blog ..Super Cool Collection of Google Doodles and its Tales =-.

    • April 2, 2010 at 8:37 pm #

      My pleasure mate :)

Leave a Reply