3 ms·
There is a well-defined solution to this problem: The Public Suffix List. https://publicsuffix.org/ https://publicsuffix.org/ blogspot.com is in it. github.co
by kentonv 11y ago
There is a well-defined solution to this problem: The Public Suffix List.
https://publicsuffix.org/ https://publicsuffix.org/
blogspot.com is in it. github.com is not, but github.io (where Github Pages are hosted) is. I would guess this is what HN uses.
That said, it of course can't help with e.g. categorizing github repo links by user, since those are by path rather than subdomain. Ah well.