How to Remove Duplicate Domains From a URL List

Collapse repeated URLs into unique root domains or hostnames while retaining frequency counts and source evidence.

FlashDomains Editorial·August 21, 2026·7 min read

Duplicate domains are not always duplicate rows. A URL list can contain hundreds of distinct pages that belong to one site. Removing only identical URL strings leaves that site repeated; reducing each URL to a domain first creates the grouping key you actually need.

Exact URL duplicates versus domain duplicates

InputExact-URL dedupeRoot-domain dedupe
example.com/aKeptexample.com
example.com/bKeptMerged into example.com
blog.example.com/cKeptMerged in root mode
Repeated example.com/aRemovedCount added to the root

How to create a unique domain list

  1. Paste or upload the source data.
  2. Choose root domains for one record per registrable site, or hostnames when subdomains must remain separate.
  3. Enable Remove duplicates.
  4. Review the count column; it records how many matching occurrences were merged.
  5. Export CSV or JSON if you need source mapping, or TXT for the final value-only list.

Repeatable process

Create a unique domain list with useful counts

Remove repetition without erasing evidence about how often each domain occurred.

  1. 1

    Normalize each source row

    Parse URLs, remove irrelevant components and standardize case before comparing values.

  2. 2

    Choose the deduplication key

    Use root domain for site-level uniqueness or hostname for host-level uniqueness.

  3. 3

    Aggregate occurrences

    Count every row assigned to each normalized key and retain representative sources.

  4. 4

    Sort for the decision

    Sort alphabetically for a reusable list or by frequency to find concentration.

Side-by-side

Unique lists and frequency tables

Both remove repeated output rows, but only one preserves how much repetition existed.

DecisionUnique listFrequency table
OutputOne row per domainOne row per domain plus count
Best forImports, blocklists and allowlistsAudits, prioritization and concentration
Lost informationNumber of source occurrencesIndividual source details unless mapped separately

Where it helps

Where deduplicated domains save time

Use the cleaned output as a focused input to the next analysis—not as a substitute for that analysis.

Prospect lists

Prevent the same organization appearing repeatedly because several pages were found.

Blocklists

Produce one normalized entry per root domain or hostname.

Link audits

Rank domains by the number of matching backlink or outbound-link rows.

Data joins

Create a stable domain key before merging exports from multiple systems.

Worked example

Preserve frequency while removing duplicate rows

Input

https://example.com/a
https://example.com/b?ref=1
https://blog.example.com/c
https://other.org/page

Result

Root mode:
example.com — 3
other.org — 1

Hostname mode would keep blog.example.com separate from example.com.

Why counts should survive deduplication

A unique list is compact, but frequency can be informative. In a backlink report it may show a sitewide link. In a crawl it may reveal a third-party host used on many pages. In a log it may show repeated contact with one hostname. The count is not a quality verdict, but it helps prioritize review.

Root-domain dedupe can be too aggressive

Collapsing api.example.com, shop.example.com and status.example.com is useful for organization-level analysis. It is harmful during a migration or incident response where each service matters. Switch to hostname mode before deduplicating in those workflows.

Public-suffix accuracy also matters. A naive final-two-label rule turns example.co.uk into co.uk and may collapse unrelated hosted projects. Read root domain versus hostname before choosing the key.

A safe data-cleaning pattern

  • Keep the original export. The unique list is a derived view.
  • Retain provenance. CSV source and line columns let you trace a root back to its records.
  • Normalize consistently. Decide how to handle case, www, IP addresses and private suffixes once.
  • Filter after extraction. Search and suffix filters should not destroy the underlying report.

For a complete example, follow the bulk URL-to-domain guide. Backlink analysts can use the referring-domain cleanup workflow.

Frequently asked questions

Does sorting remove duplicates?

No. Sorting only changes order. Enable deduplication separately.

Should www.example.com equal example.com?

Usually yes for root-level reporting. FlashDomains can strip www while retaining other subdomains.

Can I show domains that occur at least five times?

Yes. Set the minimum-count filter to five, then export the filtered report.