Why I May Switch Back to Google search from DuckDuckGo

Perhaps I’m doing something wrong, but I’ve grown frustrated with the inability to limit the search parameters in DDG. For example, when I search with DDG with the search string apple reminders -how, articles with “how” still show up, as shown in the first screenshot. Articles with “how” do not appear in a Google search; see the second screenshot.

You could find the explanation here

and here

1 Like

Thank you. I want to “ban” words preceded with - not just de-prioritize them.

First, you can exclude words from the results by adding a minus (- ) before the word. This doesn’t ban the word, but de-prioritizes it in the search results. Conversely, you can use + to increase the priority of a word.

I suppose I’ll continue using DDG for most searches because I like the privacy it provides. I’ll just use Google when I need to exclude search terms.

Thanks again.

Not sure if you have already tried using !g to send an anonymous search request to google from DDG. In the DDG search box and using your search string, you can enter the following: !g apple reminders -how

I did know that could be done. Thanks, I’ll give that a try!

Update: just tried it. That worked.

I use DDG heavily, by default on some devices. But if I need anything at all complex – search parameters like you mention, but also if I’m looking for something very specific but with some search terms that DDG will interpret very generally – I use the !g to pipe the search to Google.

DDG’s “bang” searches are wonderful – almost as good as its privacy features! I also use !w for Wikipedia often; !gi for Google Images, and so on

6 Likes

Those things (like “!g”) are called “bangs”, ddg supports a lot of them.

1 Like

Thanks, that is a new term for me. :+1:t2:

Today I learned something new.

1 Like

I am increasingly disappointed with DDG for very specific searches, which is why I often use the !g. I’ve been thinking lately of switching my default back, but had forgotten that using !g is an anonymous Google search, so perhaps I will keep things that way.

4 Likes

I agree with that: brilliant implementation by DDG! I have an Alfred workflow that enables me to type guk plus my search request and the result in the address bar of Firefox, is:

!guk [search request] -amazon -ebay -youtube

(From which I think you can tell some aspects of Google search that I can’t stand!)

Stephen

1 Like

What I do with less than ideal DDG results is to put three buttons to instantly redirect to other engines I prefer, with a userscript.

Btw the bangs are immensely powerful.

For people who are interested here’re the codes

// ==UserScript==
// @name        UnDuckButtons
// @match       https://duckduckgo.com/*
// @grant       none
// @description Buttons that redirect DuckDuckGo searches to other search engines
// @license     WTFPL
// ==/UserScript==

// This script is a fork of UnDuckButton 0.3.1 from https://greasyfork.org/en/scripts/420707-unduckbutton, with modifications including
// - open engines in new tabs by default,
// - searX search preferences,
// - optimise positioning of buttons for different screen sizes.

// Searx instances from https://searx.space
// Updated 2022-0507
var searxes = [
	"https://searx.tiekoetter.com/",
	"https://searx.be/",
	"https://search.bus-hit.me/",
	"https://searx.fmac.xyz/",
	"https://searx.mha.fi/",
	"https://search.neet.works/",
];

var searxPref =
	"preferences=eJx1Vk1z4zYM_TXRRZNMd7eddg--NDPtsZ3p3jUQCUmISELhh23l1xe0ZIuys4coJggC4APwCAURe_aE4dCjQw-mMuD6BD0e0D3__WdlWIHJiwpSZMV2MhjxUJEVnWbyfJ4PP3zCymIcWB_-_ee_H1WADgOCV8PhlyoOaPEQKJ-sPIZkYmjYNQ5PTYR2Oa2ZGtljc0R_YJDlC_u-4qDAP4c4SwiGe1Ks8VgttppFnMOqQB_BKdTN6vUvMAGr94R-bsg1kaJoLkJyHTmKclx5NmZ1TwFaI-fR9eQEDZjG2pL37JumI4Ph6etrtkxHrCk0zYqWSFuKbVIjxqahKGul1HM8Ns2RNHI-ppL36NRcHtKIHyimbQqk8lr3tcZLYMRuZx89n0g3DQuOPquKs_zX887gTVpfMiMmlv-y9-VcLDrtOZu7XqrziHXgLp7AY63Jo4osqC2X6Ty5kUAVBnrqBSoIsXTfC8DQXhGQJLXo-3XZM_eSrVL7IqknA3MN0xS2aMody0fK97gB2U-sdYnaAK2H_Fk9kdXtBhQ5KA6Tk5_EKXwuu5p8ozDwZmMkNUIoAjQkLv1c58sEKje4DRFffFhjgQ8ze1KFaTfZdc_NANtJntB5nLgwNoG47Slca2qp6oxrnT-35ICFHBDe1Cy4SKoOamADAktQJKWHeS-Cj1Pu2SIRkceZI8uVR3Cb-xkG3lXXiUZqmcdwL5QeFln-roL3xBHvtQInrx6k0umB4vwg5vkuyi_fvv1-3qLTSaPbUhTww4Et9S2_IY6lxMEx180m8Kmde7TXZE2IPqYWi9qwqAnExShFeDphW2z5ZFtT6p74TCO7F0lPmB272WIR39Prb09_fOWTo7F-e3r99en79495hHpiE0bCvii3fH8rJHALtUJ3x0tSB7Uhl851Vr4Wm5esFz0K_kzHMvstOK3ATls15tNTvuOey1x_v37kk4t0l_mLZIGjgKWNmvp-X-g56VjYEg4OwWNXBisUT1LHcqlCUbNwrK-HdGWZfAENcRd_FIzmXe1gnC07AazISGekq31JaeioJAFZx9wAC31R3Jyu_PQAySrfgbLKHmBZ5Z_06LAy5cXVx_PKNY_kw53QgOvlvSxjsHRWhpPe7iFsIAV2ZccMPwi_Z9ACyhtceL7uTakVcGB9hPb7IcpTES3kIoIpd43OHbMpTYNwibvtkpfhooUifrEubbU7Mk_XGn4_Sc7L1F0Ee0gX0QP6i_gBaLmqJjEZWBGY-tLRF8KYCBZGLZSFo6RF9vgJZ6qRpWQ7w6drq4UxtcnFdOXcNKFP4YayjDCk5QWVJz8WjJ5ckEctDEXUF5bd32_mdEdDN8ltUgAyUtI5Q4XakSxyyUjU3hNrPnGpphvZsFlekGmAYrwgFT_Y7ZrICqFZGQrq6MEFI2nVpRmvhdo2gdTocTu-jVaTScJh4ZChP7-sq5eBQxT-Rpn-BKDlqdopMDTLcHjyMrU9bMvNG6m7EedwI8ufeMrwL4sHK2s5CKZqmYhnmSSNjEKfaJpORsqOH3YEnExRTfJGorW5bip5YKVxDv8DxOdPUw==";

var randomSearx = searxes[Math.floor(Math.random() * searxes.length)];

// Add more search engines here
var searchEngines = {
	Google: "https://www.google.com/search?q=",
	eTools: "https://www.etools.ch/searchSubmit.do?query=",
	searX: randomSearx + "?" + searxPref + "&q=",
};

function getSearchQuery() {
	var input = document.getElementById("search_form_input").value;
	var inputEncoded = encodeURIComponent(input);

	return inputEncoded;
}

function newButton(text, href) {
	var a = document.createElement("a"); // allow opening in a new tab
	var btn = document.createElement("button");
	a.href = href;

	// https://stackoverflow.com/questions/6303964/javascript-open-a-given-url-in-a-new-tab-by-clicking-a-button
	a.target = "_blank";
	a.rel = "noopener noreferrer";
	btn.innerHTML = text;
	a.appendChild(btn);
	return a;
}

function main() {
	searchQuery = getSearchQuery(); // Failing here is fine, just exit if we can't find the search terms;

	// Create styles for the <div> containing the buttons
	var styles = `
		@media (max-width: 639px) {
			.redirectors {display: block; position: relative; height: 30px; line-height: 30px; text-align: center; margin-top:4px}
		}
		@media (min-width: 639px) and (max-width: 981px) {
			.redirectors {display: block; position: relative; height: 30px; line-height: 30px; text-align: left; margin-left: 73px; margin-top:4px}
		}
		@media (min-width: 981px) {
			.redirectors {display: block; position: absolute; height: 30px; line-height: 30px; right: 17px; margin-top: -34px}
		}

	`;
	var styleSheet = document.createElement("style");
	styleSheet.type = "text/css";
	styleSheet.innerText = styles;

	var div = document.createElement("div");
	div.classList.add("redirectors");

	for (var searchEngine in searchEngines) {
		href = searchEngines[searchEngine] + searchQuery;
		div.appendChild(newButton(searchEngine, href));
	}
	//div.appendChild(newButton(window.innerWidth, ""));

	document.head.appendChild(styleSheet);
	document.getElementById("header_wrapper").appendChild(div);
}

if (/\bq=\S+\b/.test(location.search)) {
	main();
}
2 Likes

You can also use !s which sends the request to Startpage which displays anonymised Google results.

1 Like

I am a vegetarian (each to their own). I cant even think of the concept in my mind of eating meat. Its my nature now.

It’s the same with me with Google. I wouldn’t even entertain the concept of using Google these days. It just in my nature now to use DDG. I know its not as good, but it is good enough.

1 Like

Thanks for this!
I’ve been annoyed with ddg for a while now, and having to revert to google. I’d forgotten all about the bangs.

DDG is my default in Safari, the bangs are incredibly handy. However, the search results often get filled with spam for me. I started blocking domains using the uBlacklist extension:

I’m up to 406 blocked domains and TLDs.