# Does \`allowed link domains\` include subdomains?

**URL:** https://meta.discourse.org/t/does-allowed-link-domains-include-subdomains/208259
**Category:** Support
**Created:** [November 4, 2021, 3:04pm UTC](https://meta.discourse.org/t/does-allowed-link-domains-include-subdomains/208259 "2021-11-04T15:04:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mattdm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattdm/32/216484_2.png) [@mattdm](https://meta.discourse.org/u/mattdm)
#### Post date: [November 4, 2021, 3:04pm UTC](https://meta.discourse.org/t/does-allowed-link-domains-include-subdomains/208259/1 "2021-11-04T15:04:34Z")

</div>

Quick question!

If I add, for example, “[fedoraproject.org](http://fedoraproject.org)” to the list of `allowed link domains`, will this also include [docs.fedoraproject.org](http://docs.fedoraproject.org), [ask.fedoraproject.org](http://ask.fedoraproject.org), etc., or should those be listed separately?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [November 4, 2021, 6:21pm UTC](https://meta.discourse.org/t/does-allowed-link-domains-include-subdomains/208259/3 "2021-11-04T18:21:43Z")

</div>

The `allowed link domains` setting does not include subdomains. You will need to list each subdomain separately. The relevant source code is here:

> <https://github.com/discourse/discourse/blob/main/lib/guardian/post_guardian.rb#L20>

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [December 4, 2021, 6:21pm UTC](https://meta.discourse.org/t/does-allowed-link-domains-include-subdomains/208259/4 "2021-12-04T18:21:50Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
