Firefox Browser Add-ons
  • Extensions
  • Themes
    • for Firefox
    • Dictionaries & Language Packs
    • Other Browser Sites
    • Add-ons for Android
Log in
Preview of Same Domain On Tab Close

Same Domain On Tab Close by Shajirr

After you close a tab, switches to another tab from the same domain according to user-defined rules.

0 (0 reviews)0 (0 reviews)
Download Firefox and get the extension
Download file

Extension Metadata

Screenshots
About this extension
After you close a tab, switches to another tab from the same domain according to user-defined rules.

Rules

Rules are evaluated in order from the top.
Maximum of 10 rules can be set.

If all rules fail, they are evaluated again from the start, but this time without the same domain requirement.
If there are no tabs of the same domain, then the rules are evaluated without the same domain requirement right away.

Warning - Logical errors

The addon doesn't check for logical errors when setting the rules.
Some rules like "Last Accessed" tab, "Oldest Tab" or "Random Tab" will always execute, so any rules after them will never be reached.
Another example - if you use "Adjacent tab: To The Right", it can fail on the first loop if the right adjacent tab is not of the same domain, but if it will be reached on the second loop without same domain requirement, it will always execute as long as there is any tab on the right, so take this into account.

Usage instructions
  • Clicking the addon's toolbar icon toggles its enabled/disabled state.
  • To open the Options menu, right click the addon's toolbar icon and select "Options"
  • After making all the rule edits, click "Save Preferences" to actually save the changes
  • Reloading the Options page will discard any unsaved changes and reload the last saved state
  • Clicking "Reset to Defaults" will restore the default set of rules. You still need to "Save Preferences" to save them, or you can reload the page to return to a previous saved state.

Compatibility
  • This addon is not compatible with other addons that also set/change tab.successorTabId property which determines what tab will be activated after the current one is closed. Example of such addon is Select After Closing Current

If you find any rule options missing, they can be added,
as long as its something reasonable and relevant (and actually possible to implement)
Rated 0 by 0 reviewers
Log in to rate this extension
There are no ratings yet

Star rating saved

5
0
4
0
3
0
2
0
1
0
No reviews yet
Permissions and data

Required permissions:

  • Access recently closed tabs
  • Access browser tabs

Data collection:

  • The developer says this extension doesn't require data collection.
Learn more
More information
Add-on Links
  • Homepage
  • Support site
Version
2026.3.16
Size
19.89 KB
Last updated
11 days ago (Mar 16, 2026)
Related Categories
  • Tabs
License
GNU General Public License v3.0 only
Version History
  • See all versions
Add to collection
Report this add-on
Go to Mozilla's homepage

Add-ons

  • About
  • Firefox Add-ons Blog
  • Extension Workshop
  • Developer Hub
  • Developer Policies
  • Community Blog
  • Forum
  • Report a bug
  • Review Guide

Browsers

  • Desktop
  • Mobile
  • Enterprise

Products

  • Browsers
  • VPN
  • Relay
  • Monitor
  • Pocket
  • Bluesky (@firefox.com)
  • Instagram (Firefox)
  • YouTube (firefoxchannel)
  • Privacy
  • Cookies
  • Legal

Except where otherwise noted, content on this site is licensed under the Creative Commons Attribution Share-Alike License v3.0 or any later version.