Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Change Safari's search box to search Google UK Web Browsers
Here's how to set Google UK as the search engine in Safari. You can use the following technique to change it to any location you prefer -- for example, France (.fr) -- but you must add (or remove) other characters to the string to keep it the same length. Please note you should not remove any of the URL, and you should also not remove or add %@ characters, as they are used as variables.

Here's what to do:
  1. Control-click on Safari in the Finder and select Show Package Contents from the pop-up menu.
  2. Navigate into the Contents » MacOS folder, and make a copy of the Safari file you find there. This is your backup in case anything goes wrong.
  3. Open the Safari file in MacOS with TextEdit. It will mainly look like a bunch of gibberish.
  4. Press Command-F to bring up the Find dialog, and then find this string: http://%@.google.com/%@?q=%@&ie=UTF-8&oe=UTF-8.
  5. Change that string to http://%@.google.co.uk/%@?q=%@&=UTF-8&oe=UTF-8. Note there are two changes here: .com to .co.uk (which adds two characters) and ie=UTF to =UTF (which removes two characters). The new string must be exactly the same length as the old or Safari will not work!
  6. Save your changes, close the file in TextEdit, and launch Safari.
I take no responsibility if you break anything, so make sure you back up the Safari file first!

[robg adds: Occasional hints editor Kirk McElhearn did some testing with the International System Preferences panel for me on this one -- Safari will use the local version of Google that matches the settings in the Language/Format tabs, as long as you also delete your Google cookies when making the changes. So this hint would mainly be useful to those who wish to have one location set via the International panel, but want to use a different local version of Google.

Please note that we covered something very similar nearly six years ago; this version is just focused on changing Google's default country, as opposed to changing the search engine entirely.

Update: More than likely, this hint will cause Safari's code signature to fail, resulting in Safari no longer being able to access the Keychain -- see this hint for more details on this problem (in 10.5 only).]
    •    
  • Currently 2.84 / 5
  You rated: 3 / 5 (19 votes cast)
 
[73,587 views]  

Change Safari's search box to search Google UK | 13 comments | Create New Account
Click here to return to the 'Change Safari's search box to search Google UK' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Change Safari's search box to search Google UK
Authored by: JoolsG4 on Mar 20, '09 08:42:50AM
Safari will use the local version of Google that matches the settings in the Language/Format tabs, as long as you also delete your Google cookies when making the changes.

That certainly doesn't work for me. I want to use google.co.uk but even though the Region is set to United Kingdom in International > Formats and I deleted all Google cookies (all 69 of them), and restarted the browser it still sends searches to google.com

What am I doing wrong, or is that bogus info?



[ Reply to This | # ]
Change Safari's search box to search Google UK
Authored by: sallythemac on Mar 20, '09 08:49:22AM

Doesn't work here, either. Have tried both suggestions, nadda. Btw I am using Safari 4 Beta.



[ Reply to This | # ]
Change Safari's search box to search Google UK
Authored by: Papillon on Mar 20, '09 09:02:58AM

Use Glims.

It's free and allows any custom searches you might want.



[ Reply to This | # ]
Change Safari's search box to search Google UK
Authored by: Fairly on Mar 23, '09 01:56:09PM

Glims uses input managers. That's a security hole that's being successively plugged. No thanks. Swizzle swizzle. ;)



[ Reply to This | # ]
Change Safari's search box to search Google UK
Authored by: Sesquipedalian on Mar 20, '09 11:14:09AM
Agreed! Glims is excellent.
Get it at http://www.machangout.com

[ Reply to This | # ]
Change Safari's search box to search Google UK
Authored by: Mac Berry on Mar 23, '09 08:56:23AM

Using international settings doesn't work if you have a custom region set, for example so that you can see the day of the week in the menu bar.

Why on earth Apple can't just make the search engine configurable in Safari preferences is beyond me.



[ Reply to This | # ]
Change Safari's search box to search Google UK
Authored by: Fairly on Mar 23, '09 12:29:44PM

They're getting paid for sending people off to Google is what I heard. You can no longer completely remove the Google search field. You could with earlier versions.



[ Reply to This | # ]
Change Safari's search box to search Google UK
Authored by: Mac Berry on Mar 25, '09 09:35:04AM
Yes that's what I think, but they could allow us to choose which Google. Relying on the regional settings plainly doesn't work, and anyway isn't intuitive.

Mark

[ Reply to This | # ]
Change Safari's search box to search Google UK
Authored by: Fairly on Mar 23, '09 12:01:09PM
This is extremely stupid. You're editing a binary non-text file with a text editor. What guarantee do you have that the text editor will precisely preserve the contents? You have *none*. For the love of all that is of at least median intelligence *use a binary editor*. Such as HexFiend.

Then again try these and you can have Google from as many countries as you like without interfering with your Safari executable. You can have Google Web, Google Images, Google Maps, Google News, and so forth. As separate commands.

http://rixstep.com/aws

Finally: if you're on Leopard and do this (either way) you're going to break the code sign on the bundle. This means Safari will refuse to access your keychain in the future.

All told this is a very uncool move. Strongly discouraged. BTW this is essentially what several third party utilities did to offer you the same "functionality". It's just crazy. Don't do it.

[ Reply to This | # ]
It does work its just that the directions are slightly wrong!
Authored by: vshjaar on Apr 05, '09 11:56:22AM
Here's what to do:

First: In Safari > Preferences > Security > Show Cookies - type in "google" and delete all the google cookies.

Then...

1. Control-click on Safari in the Finder and select Show Package Contents from the pop-up menu.

2. Navigate into the Contents > MacOS folder (make a copy of the Safari file you find there. This is your backup in case anything goes wrong).

3. Open the Safari file in MacOS with Applications > TextEdit. (It will mainly look like a bunch of gibberish).

4. Press Command+F to bring up the Find dialogue.

5. Paste this string: http://%@.google.com/%@?q=%@&ie=UTF-8&oe=UTF-8 into the "Find:" box

6. Paste this string: http://%@.google.co.uk/%@?q=%@&=UTF-8&oe=UTF-8 into the "Replace with:" box

7. Press "Replace All"

8. Save

9. restart Safari



[ Reply to This | # ]
It does work its just that the directions are slightly wrong!
Authored by: johntamlin on Dec 20, '09 02:16:41AM

I followed your instructions to the letter but there are no @% at all in the code. I repeated it a couple of times but to no avail. I have lots of 'search' but nothing that resembles the strings you quote. My Safari has come from an upgrade from 10.5. Might that be the problem?
Thanks

John

Edited on Dec 20, '09 02:17:10AM by johntamlin



[ Reply to This | # ]
Change Safari's search box to search Google UK
Authored by: kiwifiz on May 05, '09 01:39:07PM

Yes this does work but as quite clearly stated by" fairly" above you it will break all your keychain automatic password entry, which makes it pointless....I had to revert or face re-entering several years worth of web based auto logins and remembered passwords....not an option.



[ Reply to This | # ]
Change Safari's search box to search Google UK
Authored by: kerryk on Jul 08, '09 02:52:21AM

this works fine but there are two occurrences of this line that you need to change (at least in safari 4). don't worry about the password keychain for safari breaking, just use 1password by agile solutions, much better anyway.



[ Reply to This | # ]