Developer Extract

Extract domain from URL

What to do

Transformed in your browser · nothing is uploaded

Local · hostname, not registrable domain
Advertisement
320 × 100

Reduces a list of URLs to their hostnames, drops the `www.` prefix and removes duplicates. The usual first step in auditing what a page or a document links to.

How to use the extract domain from url

1 Paste your text into the first box.
2 Choose what you want done to it.
3 Copy the result, or save it as a text file.

Stripping www. is a judgement call and the right one for auditing: www.example.com and example.com are the same site to everyone except a DNS resolver, and keeping them separate makes a link audit twice as long for no benefit. Subdomains are kept, because blog.example.com and shop.example.com genuinely are different properties and often different teams. Note that the hostname is not the same as the registrable domain; reducing blog.example.co.uk to example.co.uk needs the public suffix list, which is a large data file and a different job.

Questions

It is the same site to everyone but a resolver, and keeping it separate doubles the length of a link audit for nothing.

MDN, working with strings
Advertisement
300 × 250
Was this tool any good?
Internal signal only · I use it to find the tools worth rebuilding