Top

How to force Safari 4 to open links in a new Tab instead of a new Window

February 26, 2009 by Ross McKillop 

By default, any time a web site uses the target="_blank" attribute on a link (like this one), Safari 4 will open that link in a new window. If you’d prefer it to open in a new Tab, follow the instructions outlined in this brief tutorial.

Start by opening a Terminal window (Applications -> Utilities -> Terminal). Enter the following command:

defaults write com.apple.Safari TargetedClicksCreateTabs -bool true

semi-transparent Terminal in OS X

Now restart Safari. Links that used to open in a new Window (like this one) will now open in a new Tab instead.

safari 4 tabs reverted to use the style in safari 3

If you decide you want to change back, just re-enter the command but replace true at the end of the command with false.

Random Posts

To receive articles like this one delivered directly to your inbox, enter your email address in the field below. You can always opt out of these updates at any time.

Share/Save/Bookmark

Comments

56 Responses to “How to force Safari 4 to open links in a new Tab instead of a new Window”

  1. Matt Bracksieck on February 26th, 2009 3:14 pm

    I get

    “Unexpected argument true; leaving defaults unchanged.”

  2. Rick on February 26th, 2009 6:49 pm

    And how to do this with the Windows version?

  3. links for 2009-02-26 (Jarrett House North) on February 26th, 2009 7:01 pm

    [...] How to force Safari 4 to open links in a new Tab instead of a new Window : Switching To Mac Hidden defaults setting that forces links that would open in a new window to open in a new tab instead. Should be default behavior. (tags: safari macosx) [...]

  4. Dee on February 26th, 2009 7:25 pm

    Thanks! Works great

  5. Ben Northway on February 26th, 2009 7:36 pm

    That’s awesome! Thanks!

  6. David on February 26th, 2009 9:28 pm

    Command-Click will do the same thing.

  7. Ross McKillop on February 26th, 2009 9:32 pm

    David -

    Absolutely true. As does right-click > Open Link in New Tab

  8. Ereon on February 27th, 2009 3:23 am

    Thanks for your tips :) Realy great

  9. Crazor on February 27th, 2009 7:06 am

    Works for Safari 3, too

  10. Carl on February 27th, 2009 8:44 pm

    Middle Mouse Button will do the same thing - you can choose how you want to open links. Yup, I said choose!

  11. Windows Weekly 96: The Quickening – castmedium on February 27th, 2009 8:55 pm

    [...] the tab management has made things worse for many.  Thankfully there is a tweek if you want to return the tabs to there original location through the terminal. Windows 7 RC1, Google and EU vs. Microsoft, Kindle 2, Safari, and [...]

  12. Mike on February 28th, 2009 9:56 am

    Don’t you get the same result by simply doing this: Command-click? No need to mess with terminal.

  13. Ross McKillop on February 28th, 2009 1:55 pm

    @Mike -

    Absolutely yes. But some people (myself included) would rather just click than have to hold down the command key at the same time. You can also “middle click” (depending on your mouse) to open a link in a new tab, but again, I (and a bunch of folks it seems) prefer just to ‘normal’ left click. Different strokes for different folks :)

  14. How to force Safari 4 to open new windows in Tabs on March 2nd, 2009 11:13 am

    [...] is a quick way to make sure all new links open in a new tab (tutorial via): Start by opening a Terminal window (Applications -> Utilities -> Terminal). Enter the following [...]

  15. Paul on March 4th, 2009 8:19 pm

    As small a thing as it may be, this has played an appreciable role in keeping me with firefox instead of safari. I don’t know why apple doesn’t make this the default behavior for opening links (or even provide the option in the preferences). Thanks a million for clearing my last irritation with safari.

  16. Mike on March 5th, 2009 10:56 pm

    “No need to mess with terminal.” ?

    It takes literally 5 seconds to do.

    Yes, there’s clearly ways around this (Control Click, etc). But for someone like me that NEVER opens a new window, why work around when 5 seconds of work fixes it?

  17. david on March 8th, 2009 7:47 am

    i just wanted to post how awesome you are!

  18. Anonymous on March 9th, 2009 10:06 pm

    Another great solution. Many thanks again. I can’t imagine why apple made the change in the first place.

  19. tormac on June 9th, 2009 1:01 am

    schweet, thanks so much. as a new mac user, this is one of the only things that really, really bugged me. i even downloaded firefox and was really close to ditching safari.

  20. Phil on June 10th, 2009 10:28 pm

    Thanks, this is really great. Is there another command that can force this tab to open in the background? The option is set in Safari preferences, but it doesn’t seem to apply to this new fix.

  21. Walt Ribeiro on June 12th, 2009 10:56 am

    Awesome. Was exactly what I was looking for! Thanks :)

  22. Johan Platteau on June 14th, 2009 4:59 am

    Thanks, I recently switched from firefox to Safari on Mac and I missed that feature.

  23. Brad Bulkley on June 21st, 2009 1:01 pm

    Do you know of any way to force those tabs to open in the background?

  24. Bill on June 22nd, 2009 9:19 am

    Tiny features (or lack thereof) like this drive me absolutely insane. Safari has progressed to a quite fast and slick browser with a graphical page history (a feature I love), but even though this option obviously exists in a config file, they simply couldn’t be bothered to expose it via the Preferences interface…..gee, maybe right under the “Open links from Applications in Tabs” settings.

    So let’s see:

    1) Click a checkbox or radio button under preferences, or
    2) Type in “defaults write com.apple.Safari TargetedClicksCreateTabs -bool true”

    Yeah, Macs are definitely easier *rolls eyes*

  25. matt on June 25th, 2009 10:09 am

    Thanks! Worked perfectly - and in less than 5 seconds!

  26. MilleFleurs on June 25th, 2009 11:50 am

    Thanks!
    I did it just now but my Mac opens link with the same Tab not a new Tab.
    How do I fix it?
    Can you help me some how?

  27. Ben on July 2nd, 2009 8:30 am

    Thanks so much; I’ve been wanting this for a while, so this hint is great. I’ve always preferred to keep as many tabs in one window as possible, and for simplicity’s sake I’ve wondered why Apple hasn’t agreed with that approach!

    Thanks again!

  28. Como forzar links en Safari 4 a abrir en Tabs en vez de New Windows | Mac User Boricua on July 8th, 2009 7:12 am

    [...] Vía - Switching to Mac [...]

  29. Thib on September 2nd, 2009 12:09 pm

    Awesome, works great. been looking for this for a while now
    Thanks

  30. carreralee on September 5th, 2009 10:11 am

    Yay! Finally, no more Command-clicking. Works perfectly even for a Macbook newbie like me. Thanks!

  31. Eric Herlitz on September 17th, 2009 8:14 am

    Nope, wont work in snow leopard

  32. Ross McKillop on September 17th, 2009 8:34 am

    Eric -

    I just confirmed that it does in fact work w/ Safari in Snow Leopard. I set the command to end in false, restarted Safari, and links opened in a new window. I re-ran the command w/ true at the end, restarted Safari again, and they opened in tabs. Remember, you have to restart Safari for the command/change to be enabled.

  33. Tim Brown on September 23rd, 2009 2:19 pm

    You rock! That way so annoying. I am very grateful to you for this tip. You have made my life a little better today and for that I thank you.

  34. H Smith on October 5th, 2009 11:13 am

    Thanks, much appreciated. One question: do you know how to make Safari open Google search results (from queries in the default search box) in a new tab instead of in the current tab?

  35. Carly on October 13th, 2009 7:40 pm

    Thanks! Perfect solution.

  36. RAN on November 10th, 2009 6:04 am

    solid advice!!! thanks a lot for solving an annoying oversight!

  37. Kelly on November 12th, 2009 10:51 pm

    Finally!

    So frustrating having a bunch of window open!

    Thank you!

  38. Jie Geng on December 3rd, 2009 3:18 am

    Thanks so much! Very very helpful, easy solution to my problem. I am perplexed as to why Apple doesn’t give the option of default to new tab instead of new window. It is SO ANNOYING to have windows pop out all the time, to the point where sometimes I would have several windows that I don’t even know existed.

    I agree with the rest of you that HELL YES I would rather just click than to option + click. I would like to remind some of you guys that not all of us are using a mouse. I was forced to switch to Safari after FF keeps crashing my computer (do to RAM), a switch I did not want to make. This was one of those reasons that hindered me from switching in the past.

  39. Keir on December 18th, 2009 6:56 pm

    Yeah! Awesome solution. Thank you.

  40. Kendra Martin on January 6th, 2010 8:30 am

    Thank you! This was the key feature needed to make Safari as enjoyable as Firefox.

  41. Oneiros on January 22nd, 2010 3:33 pm

    OMG THANK YOUUUUUUUUUUU

  42. Pene on January 24th, 2010 9:29 pm

    this has been annoying me for ages - I was so sick of apple-clicking on links I thought might open in a new window just in case and then missing most of the ones that do anyway :)

  43. Rick on February 5th, 2010 7:16 pm

    Works perfectly on my olde worlde g4 ibook. Thank you Sir. I don’t know why this isn’t an option under preferences… go figure.

  44. David on February 9th, 2010 11:36 am

    This solution does not work for me in OS X v10.6.2 and Safari v4.0.4. Is anyone else experiencing this problem? I really want this to work…

    Thanks,
    David

  45. David Trumbell » Safari: Open all links in new tabs on February 11th, 2010 9:59 am

    [...] unable to accomplish this in Safari v4.0.4 and Mac OS v10.6.2.  Even though there are multiple blog posts out there explaining a simple solution, it doesn’t seem to work on any of my machines. [...]

  46. Chris Cummings on February 13th, 2010 10:34 am

    Do you have a way to make these tabs open in the background? that would perfect this with a combination of making google searches open in a new window ( which after this fix open in a new tab!!!)

  47. krut on February 16th, 2010 8:54 am

    worked…awesome

    thx man!!

  48. sam dinesh on February 20th, 2010 11:18 am

    this may sound strange.. first of all.. i dont know how to open a terminal.. can anyone help me..

  49. cody on March 1st, 2010 11:51 pm

    thanx soo much

  50. Laura on March 5th, 2010 9:53 am

    Awesome! Thanks so much!

  51. dc denison on March 13th, 2010 6:13 am

    thanks. good tip.

  52. JR on April 15th, 2010 8:39 pm

    It was quicker for me to download Firefox than keep trying to make such a basic function work. Ridiculous that either I’m missing something simple or that Safari is. Thank you Mozilla. I shouldn’t have to open my terminal and reprogram anything on a brand new computer, especially for such a simple and popular function. Who on earth wants to have a new window open every time you click a link?

  53. yarqgc on May 27th, 2010 9:21 am

    Amazing. No more holding down the Apple key! Thanks!!!!

  54. yarqgc on May 27th, 2010 9:22 am

    Works for me in Snow Leopard

  55. Dirk on June 7th, 2010 4:56 pm

    I love you, man.
    This has been irritating me for months.
    Thanks for the tip.

  56. LesM on twitter on June 8th, 2010 1:23 am

    My first apple MacBook and the fix works like a hot damn. I am wondering why there are so many diehards when simple options like this are not included in prefs?

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!





Bottom