Google Domain Blocker

By vbrtrmn Last update Jan 10, 2013 — Installed 44,714 times.

Script Summary: Blocks irrelevant and spam domains.

Version: 2013.01.08



I decided to cease development of this script on, the tools to make updates, monitor, and collaborate just aren't complete enough for what I need. I will no longer be making updates here and will eventually delete this page.

The main reason for moving to github is that many people over the years have asked if they could copy the script or make updates, with github you can simply FORK the project and do whatever you want with it, rather than having to rely on my spare time to get your updates in.

Updates and new scripts are moved to my GitHub repository.


If you'd like to discuss the script or something is broke, please post in Discussions. I do not read the reviews and rarely read the issues. I do actively maintain the script and follow-up to every discussion, you can review the updates below for a full list of things I've changed over the last four years.

Recent Important Updates

Fixed a huge error in the RegEx matching function which caused blocking things like to also block .* sites such as

Added Show Google Blacklist to the User Script Commands... menu on the GM icon, should circumvent google's frequent updates making the option disappear off the page.

Google has expanded their Site Blocking capabilities, users can now block up to 500 sites. Visit Manage Blocked Sites for more information. Their blocking is still very rudimentary.

Source Code / Attribution / Licensing

Google Domain Blocker is under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. If you would like to use my work, please feel free, be sure you follow the license which I have provided. Hint: There are only three things you need to do.

Creative Commons License
Google Domain Blocker by is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Unlicensed/Attributed 1-to-1 Copies

Bug Reports and Feature Requests

Please post bug reports in the discussions section, I will not be checking the Issues and Reviews sections any more. It is too convoluted to go all over the place to get these.

Remember, I'm just one guy working on this project. I do try to answer all discussions and I have released many bug fixes, updates, and user requests. If you leave a clear message describing a problem or feature you'd like to see, I'll do my best to make an update for you. I test in Firefox on OSX/WinXP/Ubuntu I probably do not have the same configuration as each individual, please let me know what other add-ons and userscrips you're using, so I can try to match what you're seeing. If I can't duplicate the issue, I can't fix it.

About this Project

How many times do you search Google and find crappy results from search engine spam sites? Then you find them again and again. Well I got pretty sick of it, so I created this userscript.


  • Show/Hide Blacklist

    Look in the upper right hand corner, there is a new link called Show Blacklist, clicking this will show all of the domains you have blacklisted. If you click the red marker to the left of a particular domain, it will be removed from the list. You can also add in domains here, by typing them into the input and clicking the + button. If you remove an entry, you must refresh the page to see the updated search results.

    If google changes their CSS, which they somewhat frequently do, you can also access the Show Google Blacklist option from the User Script Commands menu.

  • Control Panel

    You have full control of the script via a control panel.

  • Blacklist Domain

    After searching for something, a new link is added to the bottom of each result, called Blacklist Domain. Clicking this will ask you to confirm blacklisting of that domain name.

  • Regular Expressions / Wildcards

    I've had several requests for wildcard matching, due to spam domains using multiple subdomains. I implemented this using regular expressions, then remembered that regular expressions for the average user is kind of a pain. In the preferences section, you can enable RegEx Blocker, this will block a full domain and all subdomains.

  • Preferences

    Allows you to enable and disable features in the userscript.

  • Import/Export Blacklist

    This is now implemented, you can select to import or export your blacklist. The data is output as a JSON string, just click export, copy the string and import it into another instance of Firefox.

    I'm planning on adding some kind of server-side component to this in the future, I just don't have time right now.


Jan 8, 2013 18:48

Changed location of "Blacklist Domain" per request.

Changed polling code, switched to only DOMSubtreeModified on div#search, may change to something else if I don't like this. Seems to be working well enough.

Dec 19, 2012 17:04

Fixed error with regex matching, special thanks to Jefferson Scher

Oct 8, 2012 13:48

Added google drive, tbm=shop, and products to exclude list. Thanks to hans212 for pointing this bug.

Removed require for, greasemonkey seems to be automatically getting updates these days, may re-add it if thinks don't work.

Oct 2, 2012 17:30

Removed legacy MD5 code, can't remember why I had it in there. Thanks to mugPuke for finding this.

Sep 26, 2012 13:00

Fixed a bug causing https to be blocked.

Aug 29, 2012 21:30

Added to exclude list.

Aug 28, 2012 17:47

Moved the "Show Blacklist" toggle a bit, so it won't cover stuff up when viewing images.

Added plusone subdomain to the exclude list.

Aug 28, 2012 12:55

Changed the location of the "Show Blacklist" to the top-right corner to mitigate issues with different login states.

Aug 28, 2012 12:39

Per the API I added the @grant imperative.

Aug 25, 2012 12:52

Fixed some error narfing the script.

Aug 24, 2012 17:00

Added method to toggle the blacklist display via the "User Script Commands" menu, thanks goes to insertrealname for this suggestion.

Aug 24, 2012 16:39

Added version number back in, accidentally deleted in previous release.

Aug 24, 2012 16:38

Accidentally removed version number.

Changed circled X marks to graphics.

Added option to blacklist sites flagged as malware, set default to ON.

Aug 8, 2012 20:20

Added version numbers, per request.

Jul 20, 2012 18:17

Removed all console.log stuff, so it doesn't cause any problems.

Added dynamic positioning, based on the two versions of the headers google uses.

Removed showHideBlacklistHover styling.

Added some coments.

Moved show blacklist to the bottom of each result.

Jul 17, 2012 14:43

Removed a console.log I accidentally left in in the previous build.

Jul 17, 2012 14:43

Changed the styling and fixed an issue created due to a Google style change.

May 25, 2012 11:27

Added another exclude.

Mar 9, 2012 04:05

Fixed issue where "Show Blacklist" menu wasn't showing.

Nov 9, 2011 14:28

Fixed 'blacklist domain' duplication error. Thanks to user blindfold for finding it.

Nov 9, 2011 14:16

Fixed minor bug where 'blacklist domain' would duplicate itself on sublinks under a listing.

Oct 14, 2011 13:13

Removed MD5 hash code, I can't remember why I originally added this.

Oct 14, 2011 13:10

Fixed non-displaying Blacklist Domain

Jul 20, 2011 17:34

Added an additional video exclude

Jul 19, 2011 19:25

Changed resize listener to DOMSubtreeModified.

Fixed bug with domain not being able to be parsed.

Added license info for json2 section.

Jul 19, 2011 18:16

Alphabetized and @exclude list, mainly did this to make adding more excludes later on.

Changed the style of the Show/Hide Blacklist to match the treatment of the search page.

Jul 19, 2011 13:16

Added Import/Export options.

Jul 18, 2011 17:31

Fixed an issue where the script could not find the 'cite' block containing the domain name.

Jul 18, 2011 16:15

Added a ton of excludes.

Fixed a bug where the 'blacklist domain' text would not show up sometimes.

Jul 10, 2011 01:25

Fixed duplicating blacklist domain.

Added google plus to exclude list.

Jul 1, 2011 17:38

Fixed bug for FF5.

Discontinued support for FF3 and FF4.

Jun 27, 2011 12:40

Fixed text duplication bug.

Mar 8, 2011 16:59

Added google docs to the exclude list.

Mar 1, 2011 19:19

Changed jquery to get from https source.
Added google shopping to the exclude list.

Feb 17, 2011 13:38

Minor color update for yes/no confirmation.

Feb 17, 2011 12:07

Update for Google's new header.

Feb 16, 2011 11:26

Removed load from the window events, due to redundancy in previous bug fix.

Feb 16, 2011 11:23

Fixed blacklist display bug.
Removed original last update code.

Feb 14, 2011 18:20

Fixed small issue with new event listener code not checking for window height changes.

Feb 14, 2011 18:14

Removed polling code altogether and replaced with even listeners for resize/scroll/load

Feb 14, 2011 17:57

Reduced polling time to one second, this was causing extremely high CPU usage for several users.
Added update checker as listed @require Another Auto Updater Instructions.

Feb 9, 2011 16:18

Changed include list to http://*.google.*/* for requested internationalization support.
Fixed a positioning bug for internationalization.
Added support for google instant search.
Added a 500 ms timeout before the script inits, this was causing the blacklist to not display sometimes.

Feb 9, 2011 13:30

Fixed bug with domains displaying, like: › Travel › Transportation › Airports

Feb 8, 2011 11:58

Minor bug fix causing div#searchform to render on top of the blacklist.

Feb 2, 2011 17:30

Added a last update display, pulls the last update from the userscript page.

Feb 2, 2011 17:08

Added possible fix for blacklist duping.
Fixed preferences defaults bug.
Added page reload for Blacklist Enable pref.
Fixed domain splitting bug.

Feb 1, 2011 21:28

Added basic instructions if blacklist is empty.

Feb 1, 2011 21:14

Blacklist domain matching error fixed.

Feb 1, 2011 20:59

Added preferences.
Added regular expression domain blocking
Updated styles.
Due to popular demand, now compatible with the AutoPagerize userscript!

Jan 25, 2011 22:35

Added all google search domains.

Dec 20, 2010 04:49

Complete rewrite using jQuery.

Sep 6, 2010 07:30

Minor bug fix.

Jul 1, 2010 21:18

Minor bug fix.

Aug 16, 2009 16:33

Minor bug fix.

Mar 9, 2009 07:06

Window resize junk added, don't remember what I was doing there.

Sep 4, 2008 20:49

Minor bug fix.

Sep 4, 2008 20:39

Initial release.

Known Issues


There is currently no support for the Chrome browser, as it does not support basic greasemonkey functions. Chromium does not support @require, @resource, unsafeWindow, GM_registerMenuCommand, GM_setValue, or GM_getValue. If they decide to implement full support at some point, this script may start working.

No Blacklist Displaying

There is some kind of compatibility issue between this userscript and one or more Add-Ons, I'm trying to narrow down the issue.