How to force Safari to open tabs the way it should

By

paper notebook with tabs
Tabs, just like those that Safari now messes up.
Photo: Charlie Sorrel/Cult of Mac

At some point, fairly recently, Safari started opening new tabs to the right of the currently open tab, instead of opening them at the end of the tab bar, as nature intended. This means that you have to search for the newly opened tab, instead of just knowing exactly where it is. I can see the point of opening tabs next to the current one, but I don’t like it.

Happily, there’s a way to revert Safari’s behavior to the good old way — the way my grandmother, and her grandmother before her, dealt with their tabs. It’s a simple option inside Safari’s debug menu. Wait? Debug menu?

Enable Safari’s debug menu

You may already be familiar with Safari’s Developer menu, which you can enable from inside Safari’s preferences. That’s not what we’re talking about today. For this trick, we need the debug menu, and that requires a trip to the Mac’s Terminal app. This tip is based on a tweet from writer T.J Luoma, and further research from Dan Moren writing at Six Colors.

If you’re running macOS Catalina, you will have to give the Terminal Full Disk Access before it can execute this command. If you don’t really know what that means, then you might prefer not to continue with this tip. Full Disk Access is what it sounds like. It grants an app access to anything on your Mac. This could be considered a security hole, but it’s also the way all Macs have worked until now.

To grant Terminal Full Disk Access, open System Preferences > Security & Privacy, then click the Privacy Tab. Then add Terminal to the Full Disk Access section.

Next, we’re going to use a defaults write command to enable Safari’s Debug menu. To do so, open up the Terminal app (in the Applications > Utilities folder), and type:

defaults write com.apple.Safari IncludeInternalDebugMenu 1

Then hit Enter, and restart Safari. Congratulations. You can now access the debug menu.

Make Safari open tabs at the end

Now, mouse up to that menu, and then mouse all the way down to the last entry, the one named Tab Ordering. It’s a long menu.

Yes, this is a long menu. You can find the option to tweak Safari tab ordering at the bottom.
Yes, this is a long menu.
Photo: Cult of Mac

Here you can set new tabs to load After Last Tab. You should also check Apply Position to Spawned Tabs and Apply Position to All Blank Tabs to get exactly the behavior you want. This lets you fine-tune Safari’s tab-opening to your heart’s desire.

You can fine-tune Safari tabs behavior here.
Fine-tune Safari’s tab behavior here.
Photo: Cult of Mac

I checked everything on this menu, although I may change things as I try this all out. The only thing that puts me off using this trick full-time is that my Safari on my Mac will act differently from Safari on iOS, which could get confusing. But right now, I’m enjoying this trip back to the good old days.