Skip to main content

AltF Flow recipe

Extract unique domains from URLs

To get unique domains from a list of URLs, extract the host from each http or https link, remove duplicates and sort. This recipe's extract step drops the scheme, a leading www. and the path, and lowercases the host, so a backlink export with hundreds of pages collapses into one line per linking domain.

  • Free, no sign-up
  • Runs in your browser
  • Nothing uploaded
  • Share recipes as a link

3 steps · runs in your browser · nothing uploaded

Pipeline

  1. Domains (from URLs)

    7 → 7 lines
  2. Keep the first copy of each line and drop repeats.

    7 → 4 lines (-3)
  3. Alphabetical

    4 → 4 lines

7lines10words255chars

4lines4words57chars-3 lines vs input

The 3 steps in this recipe

  1. 1

    Extract - Domains (from URLs)

    Pull out URLs, emails, domains, numbers, hashtags, @mentions, IPv4 addresses or phone numbers, one per line.

  2. 2

    Remove duplicate lines

    Keep the first copy of each line and drop repeats.

  3. 3

    Sort lines - Alphabetical

    Sort A to Z, Z to A, naturally (2 before 10), by number or by length.

Change any option in the workspace above, switch a step off to compare, or add your own steps. Save it to reuse it, or share the recipe as a link.

Worked example

Before
https://www.example.com/blog/post-1
http://example.com/about
https://Blog.Example.org/2026/05/guide?ref=nav
Referrer: https://news.example.net/story/123 (12 visits)
https://www.example.com/blog/post-2
https://example.org/
https://blog.example.org/tags/seo
After
blog.example.org
example.com
example.org
news.example.net

What counts as a domain here

The extract step reads the host part of URLs that start with http:// or https://. It removes a leading www. but keeps other subdomains, so blog.example.org and example.org stay separate lines. Bare domains without a scheme, such as example.com on its own, are not matched; add a Find and replace step that puts https:// in front of them first.

Variations

  • Add Join lines with ", " to paste the domains into a disavow or outreach sheet.
  • Add Add prefix / suffix with the prefix "domain:" to write each line in Google disavow file format.
  • Use Keep only duplicated lines instead of dedupe on raw URLs to find pages listed more than once.

Unique domains from URLs: questions and answers

Does it reduce subdomains to the root domain?

No. Reducing to the registrable domain needs the public suffix list (example.co.uk has three parts), which this step does not use. Subdomains are kept as written.

Are ports and paths removed?

Paths, query strings and ports are left out because only the host name is captured.

Does the text need to be one URL per line?

No. URLs can be anywhere in the text, including inside sentences or CSV rows.

More recipes like this

Every step you can add (41)

Clean up

  • Trim whitespace
  • Trim every line
  • Remove empty lines
  • Collapse repeated spaces
  • Remove line breaks
  • Strip HTML tags
  • Straighten smart quotes
  • Remove accents
  • Remove punctuation
  • Remove emoji
  • Remove non-ASCII characters

Change case

  • Change case
  • Make URL slugs

Lines

  • Sort lines
  • Remove duplicate lines
  • Keep only duplicated lines
  • Compare with another list
  • Count repeated lines
  • Reverse line order
  • Shuffle lines
  • Keep a range of lines
  • Truncate long lines
  • Wrap at a width
  • Split into lines
  • Join lines

Find and filter

  • Find and replace
  • Filter lines
  • Remove words or characters

Extract

  • Extract

Data and formats

  • Format JSON
  • Minify JSON
  • CSV to JSON
  • JSON to CSV
  • Lines to JSON array
  • JSON array to lines

Encode and decode

  • Encode or decode

Build output

  • Add prefix / suffix
  • Quote each line
  • Number lines
  • Apply a line template
  • Add timestamp
What each step does, with its options

AltF Flow runs entirely in your browser. Your text is never sent to AltFTool; saved recipes stay in this browser and shared links carry the steps only.