TXT · Text & Data tools

Domain Extractor (Extract Domains from Text and URLs)

Input
Domains
0domains0lines scanned
Go to full Text Pattern Extractor

Shareable link

Settings are written to the URL as you change them. Nothing differs from the defaults yet.

Extract hostnames

Paste a list of URLs, a mail header, a proxy log or a page of text. Each hostname is listed once, lowercased, in the order it first appears. https://www.Example.org/a, admin@corp.io and a bare cdn.example.net give www.example.org, corp.io and cdn.example.net.

A name counts only when it ends in a top-level domain from the IANA root zone list. Version numbers like v2.1.0, file names like jquery.min.js, and paths like /var/www/site.com/ are skipped.

File names that look like domains

.py, .sh, .md, .rs, .zip and .mov are top-level domains as well as file extensions. In a build log, main.py and deploy.sh are files. Bare names with those endings are dropped, while the same name inside a link (https://bun.sh/) or an email is kept, because there it can only be a host.

Root domains

Every hostname is kept whole. mail.google.com and docs.google.com stay two entries. Working out that example.co.uk is a registrable domain and co.uk is not takes the Public Suffix List, which this page does not load.

Frequently Asked Questions

The full hostname, as written: https://www.example.org/x gives www.example.org and https://api.eu.example.com gives api.eu.example.com. Cutting a name down to its registrable root needs the Public Suffix List, which is not applied here.

From three places: bare names like api.example.com, the host of every URL, and the part after the @ in every email address. They are listed in the order they appear, lowercased, each one once.

sh and md are real top-level domains, but a bare name ending in a common file extension is almost always a file. Those names are listed only when they sit inside a URL or an email, such as https://bun.sh/install.

No. A URL whose host is an IP address adds nothing to the domain list. Use the IP Address Extractor for those.

Explore Our Tools

Browse all tools