Home › URL tools › Trim to Root Domain

Trim to Root Domain

Paste a list of URLs and get each site's root URL — the protocol and full domain (kept, including www and subdomains) with the path, query and hash stripped. Runs privately in your browser.

–

What is a root domain and an origin?

Root-domain trimming reduces a full web address to just the part that identifies the site: the protocol plus the complete hostname, called the origin. Given https://blog.example.co.uk/posts/2026?ref=x, the tool returns https://blog.example.co.uk/, dropping the path, query string and hash. Importantly, this tool keeps the full hostname, including any www or subdomain, so https://sub.site.org/ stays https://sub.site.org/ rather than collapsing to a bare registrable domain. That makes it ideal when you need to group or deduplicate URLs by the exact host that serves them — working with backlink lists, site directories, or any list of links that you want to organise by site. Parsing happens with the browser itself, so it handles ports, protocols and edge cases correctly, and nothing about your list is transmitted anywhere.

Example

Paste https://blog.example.co.uk/posts/2026?ref=x and get https://blog.example.co.uk/. Paste https://sub.site.org/page#top and get https://sub.site.org/, with the path and hash stripped.

Common use cases

Pro tips

How to use

  1. Paste one URL per line into the box.
  2. Click “Trim to Root Domain”.
  3. Each line is reduced to its core domain, so sub.example.co.uk becomes example.co.uk.

FAQ

What exactly gets removed?

The scheme (http/https), any leading www., all subdomains, the path, the query string and the port are stripped, leaving just the registered domain.

What if a line is not a URL?

Lines that don’t contain a real domain (for example a bare path like /images/logo.png) are shown as “no domain” instead of returned as a result.

Is it free and private?

Yes — free, unlimited, and it runs entirely in your browser.

What is an origin in web terms?

The origin is protocol + hostname + port. For https://sub.example.co.uk/a/b it is https://sub.example.co.uk. It identifies the same trust boundary as the scheme and host.

Does it remove the path and query?

Yes. The path, query string and fragment are all stripped, leaving only the origin with a trailing slash.

Does it keep subdomains?

Yes. The full hostname is kept, including www any subdomain, so nothing is collapsed to a bare domain.

What about ports like :8080?

The port, if present in the URL, is kept as part of the origin.

Is www treated as part of the root?

Here yes — it is part of the host. If you need www stripped, use a domain-normalising tool instead.

Is it free and private?

Yes, it runs entirely in your browser and nothing is uploaded.

Related URL tools

More FAQs

Are these URL tools free?

Yes, free and unlimited with no signup.

Is my data uploaded?

No. Everything runs in your browser and nothing is sent to a server.

Related searches

trim url to domain, root domain extractor, get domain from url, remove subdomain, registrable domain, extract base domain, url tools online

Related tools