Exact hostnames decide which tabs belong together

Group Firefox tabs by domain using exact hostnames

Group Firefox tabs by checking each tab’s exact hostname, not merely the brand name in its URL. Pages on shop.example.com belong to one candidate group; a page on docs.example.com does not automatically belong to it. Paths do not change the hostname, while subdomains do.

Use the preview to compare the two shop pages with the separate documentation tab before applying any change.

Parse the URL before grouping

For each tab, separate the URL into its hostname and path. For example:

  • https://shop.example.com/cart → hostname: shop.example.com; path: /cart
  • https://shop.example.com/orders/42 → hostname: shop.example.com; path: /orders/42
  • https://docs.example.com/guide → hostname: docs.example.com; path: /guide
  • https://news.other-site.test/story → hostname: news.other-site.test; path: /story

The first two tabs have different paths but the same hostname. They are consistent members of one exact-host group. The documentation tab uses a different hostname, even though example.com appears in both addresses. Treating every shared base domain as one group would broaden the rule beyond exact-host grouping.

A hostname is also different from a page title or visible brand. Two services can use similar names, and one service can operate several subdomains. Make the hostname the decision boundary before moving or grouping any tab.

Worked Firefox example

Consider this illustrative set in one normal Firefox window:

  1. https://shop.example.com/products — ordinary tab
  2. https://shop.example.com/checkout — ordinary tab
  3. https://docs.example.com/api — ordinary tab
  4. https://news.example.net/story — ordinary tab
  5. A pinned tab containing a frequently used homepage

The two shop.example.com tabs qualify for the same exact-host group. Their paths differ, but that difference is irrelevant to hostname membership. Keep both pages open and treat the group as a container for related pages from that host.

The docs.example.com tab stays outside that group. It may belong to a separate group if there are other documentation tabs, but one related base domain is not enough reason to combine it with shop.example.com. The news tab is unrelated and remains outside the example groups.

Keep the pinned tab and the one-off news page outside the proposed groups while you review the two shop pages.

Keep the pinned tab separate. Pinning represents a different browser state, so it should not be pulled into an ordinary hostname group merely because its URL resembles another tab. The expected result is one proposed group for the two shop pages, with the documentation, news, and pinned tabs unchanged.

Apply the decision in Firefox

  1. Select one normal window and list its open tabs. Do not mix tabs from another window while deciding membership.
  2. Read each URL’s hostname. Ignore paths when comparing exact-host membership.
  3. Put tabs with identical hostnames into one candidate set.
  4. Put subdomains into separate sets unless you have deliberately chosen a broader rule. shop.example.com and docs.example.com are separate exact-host sets.
  5. Leave one-tab sites ungrouped when grouping them would add no useful context.
  6. Exclude pinned tabs from ordinary grouping.
  7. Review the proposed membership before applying any Firefox grouping command or extension action.

Repeat the process independently in each selected normal window. If the same hostname appears in two windows, that does not by itself justify moving tabs between them. Window boundaries matter: make a group inside each window rather than treating all matching URLs as one cross-window set.

Check edge cases before changing tabs

A URL such as https://shop.example.com/?ref=email still has hostname shop.example.com; its query string does not create a new group. Conversely, https://www.example.com and https://example.com are different hostnames for an exact-host rule, even when they serve similar content.

Do not assume that Firefox exposes an automatic “group by domain” command, or that an extension supports every Firefox window type. Available controls and extension compatibility can vary by browser version. Verify the current Firefox behavior first, then compare its proposed membership with your hostname list.

The useful stopping point is clear: group the two identical-host shop tabs, keep the different subdomain and unrelated news page out, and leave the pinned tab untouched. Broaden the rule only when you intentionally want related subdomains together; shared branding alone is not sufficient.

Firefox Tab Groups Extension

How To Create Tab Groups In Firefox

How To Make Tab Groups In Firefox

Check the proposal in each selected normal window, then stop before broadening the rule to related subdomains.

FAQ

Does Group Tabs by Site work in every Firefox window?

It requires a browser with tab-grouping API support. Private windows are excluded, and pinned tabs stay separate. Existing groups are unchanged unless you explicitly choose to add tabs to one in the same window. Compatibility can vary by browser version, so verify current Firefox documentation before relying on the tool.

Should shop.example.com and docs.example.com share one group?

No, not under an exact-host rule. They are different hostnames, even though both contain example.com. Combine subdomains only when you deliberately choose a broader rule.

Do paths or query strings change the grouping decision?

No. The hostname stays the same when only the path or query string changes, so pages such as shop.example.com/cart and shop.example.com/orders/42 still match.

How should pinned tabs and one-tab sites be treated?

Keep pinned tabs separate from ordinary hostname groups. A site with only one tab can stay ungrouped when grouping adds no useful context.

Can matching hostnames in two Firefox windows form one group?

Decide membership independently in each normal window. Do not move tabs across windows merely because the hostnames match; each window needs its own grouping decision.

Is www.example.com the same exact host as example.com?

No. They are different hostnames for an exact-host rule, even if they serve similar content.