Safari omnibar - all searches go to DDG!

I changed a setting in Safari redirecting all Google searches done in the omnibar to DDG. I'd like to undo that change, but I can't remember how. I think I entered a preference settings by typing something in the omnibar like Settings:, or Preferences:...


Changing "Default Search Engine" to Bing or Yahoo works (correctly redirects searches). I have no 3rd party extensions. Safari 6.0.2.


Cheers,

Shawn

MacBook Pro (13-inch, Mid 2012), OS X Mountain Lion (10.8.2)

Posted on Mar 1, 2013 8:07 AM

Reply
38 replies

Mar 6, 2013 8:19 AM in response to Bracks

Would a fresh re-install of Safari solve this?


Not unless you hacked a system file. Before spending any more time on this matter, I'd like to understand the statement you made in your original post:


I changed a setting in Safari redirecting all Google searches done in the omnibar to DDG.


There is no such setting. If you weren't referring to a Safari extension, then I'm at loss to know what you could possibly have meant.

Mar 6, 2013 8:28 AM in response to Linc Davis

I remember reading something on the Internet (I know, I know...) that discussed how to add DDG search directly to the Safari Omnibar. To do this, I would need to change/redirect the IP address for one of Safari's default search engines. I remember typing something in the Omnibar that brought up a page of "settings" or something, whereupon I searched for the www.google.com default search item and changed it to www.duckduckgo.com.


But, why is all google searches conducted in other browsers also redirected to DDG? I don't know. To be honest, I have searched and tried to fix this problem for ~6 months now. Without success...


I know enough to break something, not enough to fix it. 😟

Mar 6, 2013 9:15 AM in response to Bracks

You may have hacked the system to redirect traffic to certain servers. The file modified would be /etc/hosts.

The easiest way to fix the hosts file is to restore it from a backup that predates the modification, or to copy the unmodified file from another Mac. If you can't do that, then do as below. Please read this whole message before doing anything.


Back up all data. This is a simple procedure, but if you don't follow the instructions exactly, you could be left with an unbootable system. In that case, you'll have to restore from a backup or reinstall OS X.



If you have more than one user account, you must be logged in as an administrator.


Triple-click anywhere in the line below to select it:

open -a TextEdit /etc/hosts

Copy the selected text to the Clipboard (command-C).

Launch the Terminal application in any of the following ways:


☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)


☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.


☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.



Paste into the Terminal window (command-V). A TextEdit window should open. At the top of the window, you should see this:


##

# Host Database

#

# localhost is used to configure the loopback interface

# when the system is booting. Do not change this entry.

##

127.0.0.1 localhost

255.255.255.255 broadcasthost

::1 localhost

fe80::1%lo0 localhost


Below that, you'll see some other lines. There should be nothing above the first line "##". If you have any doubt about that, STOP and ask for guidance. Make sure you scroll all the way to the bottom of the document. Scroll bars are hidden by default until you actually start scrolling, so you may not realize that you’re not seeing the whole document.


If the contents of the TextEdit window are as described, close it, then enter the following command in the Terminal window in the same way as before (by copy and paste):


sudo sed -i~ '11,$d' /etc/hosts

This time, you'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning to be careful. Confirm. Quit Terminal. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.


That will fix the hosts file. There is now a copy of the old hosts file with the name "hosts~" in the same folder as "hosts". You can delete the copy if you wish.

Mar 6, 2013 10:30 AM in response to Linc Davis

This DDG gets installed without the need of an extension.


There is a warning there that DDG should not be added to Safari unless it is from

Extension Gallery.

This is an unofficial add on, accomplished by entering IP address of Google and DDG

or by issuing a shortcut.

This edits the Host file and affect Frameworks.


Normally DDG is tested with Firefox / Yahoo combination.


This much I know.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Safari omnibar - all searches go to DDG!

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.