22

How do I revert to the default Google search engine in Chrome?

Most sites have a simple querystring search, like http://mysite/search/?query=%s, but Google has some weird query string, and I'm not sure how to restore it.

1

4 Answers 4

38

You can goto

Settings > Manage Search Engines
in Google Chrome and you can add Google Search Engine again. Here's how:

  1. In the bottom you will find
    Other Search Engines
    and below that text boxes for adding a new search engine.
  2. Give Name -
    Google
    Keyword -
    google.com
    and paste the below code in the URL box: {google:baseURL}search?q=%s&{google:RLZ}{google:acceptedSuggestion}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchFieldtrialParameter}{google:searchClient}{google:sourceId}{google:instantExtendedEnabledParameter}ie={inputEncoding}

Hope this helps.

3
  • 2
    No help to me. An installer has managed to overwrite the google:baseURL variable with a link to feed.sonic-search.com, which redirects to search.snapdo.com. Trying to find how I can reset google:baseURL to the correct value. The Google search engine has exactly the text you provide but gets the bad link injected. Aug 24, 2014 at 16:50
  • 2
    That sounds very much like malware. Try running a scan using malwarebytes to kill any infections. Sep 3, 2014 at 5:52
  • 3
    New value for Google default: {google:baseURL}search?q=%s&{google:RLZ}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchFieldtrialParameter}{google:bookmarkBarPinned}{google:searchClient}{google:sourceId}{google:instantExtendedEnabledParameter}{google:omniboxStartMarginParameter}{google:contextualSearchVersion}ie={inputEncoding} Feb 3, 2016 at 15:17
8

Goto Chrome → Settings and click on the Manage Search Engines button.

Add new search engine

  • Name: Google
  • Keyword: google.com
  • Url: {google:baseURL}search?q=%s&{google:RLZ}{google:acceptedSuggestion}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchFieldtrialParameter}{google:searchClient}{google:sourceId}{google:instantExtendedEnabledParameter}ie={inputEncoding}

This is what I have set in Chrome.

5

(My answer from webapps.SA)

If you just want to permanently use google.com (or any other fixed URL) as the search engine, above two methods probably is not what you are looking for. /ncr and adding another search engine both breaks the default realtime search functionality. Try this,

  1. Close all the Chrome/chromium browsers,
  2. go to User Data folder

    • Windows: users\username\appdata\local\google\chromium\User Data (or similar - please edit if this is wrong)
    • Linux: ~/.config/chromium/Default
  3. open the file named LocalState (windows) or Preferences in vim/notepad, and change,

    • last_known_google_url and
    • last_prompted_google_url to whatever the baseURL you want. Ex. "https://www.google.com/"
  4. Save.

For more info look at this old bug report.

1
  • 2
    On OS X you can find the last_known_google_url in ~/Library/Application Support/Google/Chrome/Default/Preferences
    – Mennny
    Apr 2, 2015 at 7:59
1

The problem with manually adding/editing the search URL is that it won't restore the built-in behavior fully, specifically the dynamic autocomplete suggestions based on Google search because it's an internal field present in the prepopulated search engines. The only officially documented method is to reset the browser settings, but it'll nuke most of your profile data.

Here's how I've restored just the built-in Google engine and kept the profile intact:

  1. Find your User Data directory.

  2. Exit Chrome fully via its menu -> Exit, so that no hidden processes or tray icons remain.

  3. Copy/zip the contents of that directory somewhere else so you have a backup just in case.

  4. Open Secure Preferences file inside the profile directory in a text editor.

  5. Delete the text that starts with "default_search_provider_data":{ and ends with },

    Some editors conveniently highlight the closing bracket when the cursor is at the opening {.

    Note the comma should be also deleted.

    Make sure you don't reformat the file because its parts are protected by a "hashsum", meaning that changing even one byte there would prompt Chrome to reset all settings. You can open the file in an online JSON beautifier beforehand to have a visual confirmation that you're deleting the correct part.

  6. Save the file and start Chrome, go to chrome://settings and verify the result.

Yet another nondestructive solution that doesn't involve kinda hackish editing might be to manually add a local policy for DefaultSearchProviderSuggestURL, and other related keys like DefaultSearchProviderImageURL, DefaultSearchProviderSearchURL.

1
  • In secure preferences, I only have one line: {"protection":{"macs":{},"super_mac":"E258E3F3F18FA7028417E5C32331279DDBB30BF80AD7FC816960427EBF5230F1"}} how do I see everything else that's in it? Jun 20, 2023 at 2:08

You must log in to answer this question.

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