4

Search the web from Spotlight (⌘ CommandSpace) by entering search text and pressing ⌘ CommandB. The expected result of opening the default web browser (Firefox) and completing the web search occurs. However, the web search engine uses Google rather than the default (DuckDuckGo).

How can I set it so the search is done with my chosen search provider?

macOS 10.15.7

1
  • refer this link to setting safari's search engine
    – jianyongli
    Commented May 7, 2021 at 18:15

4 Answers 4

3

Those who have a more recent macOS such as Big Sur (11.x) can solve this problem by simply changing the default search engine for Safari. Big Sur uses Safari's default search engine to get the results in the default browser (in this case Firefox), if the web search is launched via Spotlight.

Imagine Ecosia as the default search engine in Safari and DuckDuckGo in Firefox. When you're using Spotlight, it uses Ecosia (the default search engine in Safari) to produce a search URL and opens it in the default browser (Firefox).

4
  • 1
    The OP states that the default browser in the aforementioned computer is Firefox, not Safari. Changing the default search engine in Safari would not change that on Firefox.
    – Alper
    Commented Jul 8, 2021 at 14:40
  • The problem is about spotlight opening results in another search engine. Mac os spotlight uses default search engine setting in safari to show the results. In this case it gets default search engine in safari (for example google, or ddg) and uses that to open search result page in default browser (in this case firefox). So spotlight just uses the safari default search engine and does not depend on default browser's search engine. I had this problem and even my default browser is firefox and can confirm this works.
    – maanijou
    Commented Jul 8, 2021 at 18:12
  • 1
    Your description is correct only for Big Sur (11.x) and perhaps the upcoming Monterey (12.x). However, the OP states that the macOS in question is Catalina (10.15.7). In recent but prior versions of macOS to Big Sur, if the default browser is not Safari, Spotlight uses Google as the default web search engine no matter what Safari’s default search engine is as described in [@Allan’s answer] (apple.stackexchange.com/a/406028/359458) to this question.
    – Alper
    Commented Jul 8, 2021 at 19:45
  • Yes you're correct this is only for Mac os 11.x. I had this problem and reached this page. I thought it will be nice to put my solution in here for current users of Mac
    – maanijou
    Commented Jul 8, 2021 at 19:47
1

You can't change this.

It used to be Bing was the default search for Spotlight, but doing some research I found that of recent, Google has been paying Apple a significant sum of money to be the default search engine.

While using Spotlight for web searching is a nice feature, until the ability to change the engine becomes a reality, the only workaround is to search from your browser.

2
  • iOS 14 is moving away from Google to Apple’s own search engine. Perhaps macOS will follow.
    – Paretile
    Commented Nov 12, 2020 at 11:15
  • 1
    This answer is correct because the OP states that macOS in question is Catalina (10.15.7). However, things have changed with Big Sur. The spotlight launched (default) web browser uses the default search engine set for Safari in Big Sur even if the default search engine for the launched browser is different from Safari's (or Google).
    – Alper
    Commented Jul 8, 2021 at 19:52
1

As a workaround you can solve this issue at the browser-level using custom Chrome/Firefox/Safari extension that redirects user from https://www.google.com/search?q=... website to https://duckduckgo.com/?q=....

I've some experience building a similar extension that redirect users from Google to Yandex Search when search query contains letters in Russian (not English) to improve search results quality. The source code can be found here: https://github.com/nezort11/google-yandex-cyrillic-redirect. It works almost instantaneous.

Approximate code to redirect from Google to DuckDuckGo for Firefox:

browser.webRequest.onBeforeRequest.addListener(
  redirectSearch,
  // Request filter
  {
    urls: ["https://www.google.com/search*"],
  },
  // Modify the request
  ["blocking"]
);

function redirectSearch(requestDetails) {
  const url = new URL(requestDetails.url);
  const query = url.searchParams.get("q");

  if (query) {
    return {
      redirectUrl: `https://duckduckgo.com/?q=${query}`,
    };
  }
}
0

This issue has been resolved on macOS 11!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .