Sort URLs by Domain

Groups web addresses by website, so every page from the same site ends up together, whether or not it starts with http://, https:// or www.

Advertisement

How it sorts

Addresses are sorted by the website’s own name, the part you would buy from a domain registrar, such as acme.com or example.co.uk. Within each website:

  • the main site comes first (www. is ignored), then its subdomains such as blog.acme.com or shop.acme.com, A to Z;
  • pages are then sorted by their path, so /about comes before /contact.

http:// and https:// make no difference, and capital letters don’t matter. If a line has other text as well, its first web address counts. Lines without a web address sort to the top so you can find and fix them.

Cleaning up a list of links

  • Keep one per domain keeps the first link from each website and removes the rest, in the original order: handy for outreach lists, backlink audits or a list of sources where each site should appear once.
  • Domains only replaces each address with its website (https://www.acme.com/about becomes acme.com). Press Remove duplicates afterwards for a list of every website, each once.
  • Sorting by domain is also a quick way to spot typos and odd ones out, because they end up in their own little group.

Links buried in a web page or a document? Use Extract URLs to pull them out first.

Your list never leaves your computer: everything happens in your browser.

Links from several websites

Before
https://www.zoo.org/tickets
https://blog.acme.com/news
acme.com/about
http://shop.example.co.uk/
https://www.acme.com/
example.co.uk/contact
https://zoo.org
After
https://www.acme.com/
acme.com/about
https://blog.acme.com/news
example.co.uk/contact
http://shop.example.co.uk/
https://zoo.org
https://www.zoo.org/tickets

Keep one link per domain

Before
https://acme.com/pricing
https://zoo.org/visit
https://blog.acme.com/launch
https://www.zoo.org/tickets
https://example.net/
After
https://acme.com/pricing
https://zoo.org/visit
https://example.net/

Domains only

Before
https://www.acme.com/about
http://shop.example.co.uk/cart?id=7
zoo.org/tickets
After
acme.com
example.co.uk
zoo.org

Questions

Do the addresses need http:// or https://?

No. acme.com/about and www.acme.com are recognized too. A file name such as index.html is not treated as a website.

How do I sort by the whole address instead?

Use Alphabetize a list. That sorts by the full text, so http:// and https:// addresses end up in separate groups.

Are subdomains a separate website?

No. blog.acme.com and shop.acme.com group with acme.com, and Keep one per domain treats them as the same website.