Extract domains

Extracts fully qualified domain names from text and URL hosts, excluding URL paths, queries and fragments. Use Extract URLs to find entire URLs.

Input: TextResult: Text

Text input

Tool options

Examples

Find distinct hosts behind API and asset requests

Input

https://api.example.org/v1/users
https://cdn.example.org/app.js
https://api.example.org/health

Expected answer

api.example.org
cdn.example.org
Display total
Off
Sort
Off
Unique
On
Underscore (DMARC, DKIM, etc)
Off
Extract domains from a copied mail header

Input

From: demo@example.org
Cc: ops@sub.example.org

Expected answer

example.org
sub.example.org
Display total
Off
Sort
Off
Unique
Off
Underscore (DMARC, DKIM, etc)
Off
Keep underscores in DMARC and DKIM record names

Input

_dmarc.example.org TXT v=DMARC1
selector1._domainkey.example.org TXT public-test-key

Expected answer

_dmarc.example.org
selector1._domainkey.example.org
Display total
Off
Sort
Off
Unique
On
Underscore (DMARC, DKIM, etc)
On
Count sorted unique hosts in an access-log excerpt

Input

host=z.example.org
host=a.example.org
host=z.example.org

Expected answer

Total found: 2

a.example.org
z.example.org
Display total
On
Sort
On
Unique
On
Underscore (DMARC, DKIM, etc)
Off
Avoid mistaking localhost and IP addresses for domains

Input

localhost 192.0.2.10 2001:db8::10

Expected answer

Empty result
Display total
Off
Sort
On
Unique
On
Underscore (DMARC, DKIM, etc)
Off

Parameters

ParameterDefault valueInput and choices
Display totalfalseOn or off
SortfalseOn or off
UniquefalseOn or off
Underscore (DMARC, DKIM, etc)falseOn or off

Related tools

Browse extractors tools