# Topic "popular links" panel domain extraction doesn't handle country TLDs

**URL:** <https://meta.discourse.org/t/topic-popular-links-panel-domain-extraction-doesnt-handle-country-tlds/60156>\
**Category:** Bug\
**Created:** [March 30, 2017, 4:32am UTC](https://meta.discourse.org/t/topic-popular-links-panel-domain-extraction-doesnt-handle-country-tlds/60156 "2017-03-30T04:32:15Z")\
**Posts on this page:** 1\
**Showing post:** 30

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [April 1, 2017, 12:25am UTC](https://meta.discourse.org/t/topic-popular-links-panel-domain-extraction-doesnt-handle-country-tlds/60156/30 "2017-04-01T00:25:14Z")

</div>

> [@tgxworld](#):
>
> Can I confirm that the original intent is to “Extract the domain without the subdomains” even though the approach was too simplistic?

Isn’t this patently obvious?

- `meta.discourse.org` → `discourse.org`
- `www.youtube.com` → `youtube.com`

 ![](https://global.discourse-cdn.com/meta/original/3X/e/c/ecbe270a8341311df72f9c22ad6899ce2b033704.png)

> [@tgxworld](#):
>
> If we introduce that solution, we’ll end up showing the full domain for domains like m.abv.bg which is what you didn’t want.

That sounds correct to me, the goal is to shorten, to reduce redundant or over specific information, but if it’s already quite short to begin with, why bother?

The actual edge condition would be something like

`crazilylongthinghere.abv.bg`

and I am willing to bet that is _incredibly_ rare.

---

_[View the full topic](https://meta.discourse.org/t/topic-popular-links-panel-domain-extraction-doesnt-handle-country-tlds/60156)._
