How to Delete Ads by Google

By Kevin Lee

Software programs such as Ad-Aware and Adblocker Plus remove Google ads. Your HOSTS file can do the same thing. Every computer running Windows has a HOSTS in the system directory. This file maps IP addresses to websites. For example, if you add "66.172.14.244 www.texas.com" to your HOSTS file, every time you type "www.texas.com" in your browser, you will go to www.france.com instead. Malware can hijack browsers by modifying HOSTS files using this technique. To delete Google ads, use this principle to redirect Google ad URLs so that they do not appear on your web pages.

Step 1

Click the Windows "Start" menu and paste the following text into the search box:C:\Windows\System32\drivers\etcPress "Enter." Windows Explorer will open and display the contents of the "etc" folder. You will see a file named "HOSTS" in the folder.

Step 2

Right-click that file and select "Copy." Then select right-click a blank area in the folder and select "Paste." Windows will create a backup of the file named "HOSTS - Copy."

Step 3

Click the Windows "Start" menu and type "Notepad." Notepad will appear in the list of results. Right-click Notepad and select "Run as Administrator." If you receive a confirmation prompt, click "Continue." Notepad will open in Administrator mode.

Step 4

Press "CTRL+O" to display the "File Open" window.

Step 5

Click the drop-down window labeled "Text Documents" and select "All files."

Step 6

Paste the following text into the address bar at the top of the window:C:\Windows\System32\drivers\etcNotepad will display a list of files in the "etc" directory.

Step 7

Double-click "HOSTS." The HOSTS file will open.

Step 8

Copy the following text and paste it after the last line of the file:127.0.0.1 pagead2.googlesyndication.com127.0.0.1 pagead.googlesyndication.comEach line represents a Google URL. The 127.0.0.1 portion of the string maps each URL to your local computer. When a web page requests one of these URLs, it will not load.This will prevent the ad from appearing on the web page.

Step 9

Press "CTRL+S" to save the file.

Tips & Warnings

  • To allow Google ads to appear again, remove the lines that you added to the HOSTS file.