Hot on HuffPost Tech:

See More Stories
Engadget for the iPhone: download the app now
AOL Tech

How to block ads or annoying services like Tynt in any browser, on any computer -- without additional software

Now, we've previously covered extensions for both Chrome and Safari 5 that stop Tynt from ruining your copy/paste party, but if you've got administrative rights to whatever computer you're currently using, you can put a stop to more than that. You can block services like Tynt -- or even entire ad networks -- once and for all with nothing more than a text editor and admin rights.

All you have to do to block ads, Tynt, or even Facebook from ever bothering you again is to add their hostnames to your computer's hosts file. The best thing about this is that you can do it whether you're using a Windows PC, Mac, or Linux. They've all got hosts files, and power-users have been using them for years to speed up browsing or block ad networks. As an example of using the hosts file as a system-wide ad-blocker, check out this list of ad network hostnames that's ready to be pasted in.

For the purposes of this short guide, we're going to use Tynt as our target service to block. Remember, you can use this method to block anything. Simply apply the steps used here to put the kibosh on whatever other services or sites you choose.

If you're unfamiliar with Tynt, it basically appends an "attribution" link to any text copied off of a page that uses it. The usual user-response when this happens is an audible cursing of the site using it and a quick deletion of the added link.

While the site owners who use Tynt tend to claim they're doing it to ensure proper attribution, it's actually more about getting exposure and linkbacks. Anybody who's come across this annoyance can attest to the fact that it's not making anything proper or easy for the person doing the copying -- and contrary to the beliefs of the ultra-paranoid, a user shouldn't be branded a thief and plagiarist just for copying and pasting text.

Tynt works by using a JavaScript that's hosted on Tynt servers; it's called by code embedded in the page that's using it. The script itself is at, so if your browser never connects to that server, the script won't load. What we're doing here is adding that hostname to a list of addresses on your computer that don't require DNS lookup. It's called your hosts file, and it's extremely useful, especially for little problems like this that crop up from time to time. Using this file, you can tell your computer that anytime it sees, it should look straight to the IP that you give it (instead of using a DNS query). In this case, the IP address we're giving it is -- which is a null address that will instantly fail to resolve.

Update:This post originally used as the IP to point these services to, but as one of our commenters has pointed out, is a slightly better option. You'll also find most pre-made lists of ad networks use as well -- both addresses work fine, but is preferable due to being null. Requests sent to may be retried several times before failing. When a request is made to the null address, it fails immediately. Happy blocking!
(Thanks, Stinlen56.)

Already know all about adding entries to your hosts file?

Just add this line:

If you've never touched your hosts file before and need a little help, here's how to do it in Windows, Mac OS X, and Linux:


Windows is a bit annoying when it comes to system files, so depending on which version of the OS you're using, it could be in a different place.

For XP:

1. Open "My Computer" and navigate to c:\windows\system32\drivers\etc\
2. Right-click on the file called "hosts" -- click Open
3. When prompted to choose an application to open the file, choose Notepad.
4. You should see one line at the bottom that reads localhost
5. Add a line underneath it that reads then save the file.

When you're done, the bottom of your hosts file should look like this: localhost

For XP Pro, you should be prompted for an admin password before editing the file. Otherwise, the process is the same as it is for XP Home. For NT/2000 systems, change c:\windows\ to c:\winnt\, and everything should fall into place accordingly.

For Windows 7 and Vista users, it's again in c:\windows\system32\drivers\etc\, but there's a slight twist to opening it. This time, you'll have to right-click on Notepad (it should be somewhere in your Start menu), and choose "Run as Administrator" from the resulting pop-up menu. That should open Notepad with elevated user-privileges, allowing you to edit system files. Now go to File and choose Open. Either navigate to the folder or simply enter c:\windows\system32\drivers\etc\hosts in the field available, and it should open the file for you to edit. Now, you just add the line and save the file!


It's a sad fact that most Mac users don't even realize they're running a UNIX system. OS X keeps its hosts file in the same place as all other UNIX systems, as well as their Linux cousins; it's always /etc/hosts, and there are any number of ways to edit it.

For those of you who are savvy with the command line, just edit /etc/hosts with your text editor of choice as root (either using su or sudo). For the non-savvy out there, here's a quick breakdown using TextEdit:

1. Go to Applications, then open the Utilities folder.
2. Open Terminal
3. At the command prompt, type:
sudo /Applications/ /etc/hosts
4. Hit the Return key and enter your admin password when prompted.

Now TextEdit should open and display the contents of your hosts file like this:

# Host Database
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
## localhost broadcasthost
::1 localhost
fe80::1%lo0 localhost

Note that it says "Do not change this entry" rather ominously; it's really telling you not to change the entries that are already there. Simply add another line to the file under those entries:

# Host Database
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
## localhost broadcasthost
::1 localhost
fe80::1%lo0 localhost

Save the file, quit TextEdit, and then quit Terminal. Et voila! You've just stopped Tynt from ever bothering you again on your Mac. That wasn't so scary now was it?


Like I mentioned before, OS X and Linux distros have a lot in common, so you shouldn't have any trouble locating your hosts file if you're running a Linux box. However, since no two distros are alike, and that includes which text editors are present, it's a bit difficult to explain to new Linux users how to edit their hosts file without knowing what they've got to work with. Generally speaking, most Linux users are more tech-savvy than the average Joe, so I'm going to give you the benefit of the doubt and send you on your merry way with the hostname to add to the file.

add this to the bottom of your /etc/hosts file:

If you have trouble and don't know where to start, here's a quick step-by-step that uses the command line and Vi, an ancient text editor that's almost guaranteed to be on every Linux system in the known universe.

1. Open a terminal app, usually something like XTerm.
2. At the command prompt, enter sudo vi /etc/hosts
3. Enter your admin password when prompted.

The file will display for you. Now, using the arrow keys, move the cursor down to the very last line and over to the last character of the entry there. It will probably be hovering over the last letter of a word (probably "localhost"), and it won't move past the word. This is where you press the i key, which will toggle insert mode. Now, you should be able to move the cursor one more space to the right so that it's no longer over the last character of the word in that entry. Hit Enter to make a new line in the file.

Now, type (carefully), and then hit Enter again to give it another new line underneath your new entry. Hit the Esc key to exit insert mode, and then hold the Shift key and type ZZ to save and exit Vi.

That's it!

Want to block even more annoyances? Check out's host file -- it's another fantastic list you can copy and paste into your your own hosts which includes hundreds of malicious and bothersome sites.

Share submit to reddit

Tags: annoyances, copy paste, CopyPaste, hosts file, HostsFile, how-to, howto, howtos, linux, mac, tynt, windows