# 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:** 2

<div class="post-metadata">

**Author:** ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)\
**Post date:** [March 30, 2017, 6:33am UTC](https://meta.discourse.org/t/topic-popular-links-panel-domain-extraction-doesnt-handle-country-tlds/60156/2 "2017-03-30T06:33:39Z")

</div>

Our current logic only extracts the last two level in the domain name:

> <https://github.com/discourse/discourse/blob/99abbc2e2d8a5a9050688c346b02d1e21b3c221d/app/assets/javascripts/discourse/widgets/topic-map.js.es6#L160-L163>

I think it’ll be easier and clearer if we just show the domain instead of trying to figure out what the root domain is.

---

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