# Discourse托管在WWW子域名时应设置哪些正确的DNS记录？

**URL:** <https://meta.discourse.org/t/correct-dns-records-to-set-when-discourse-is-hosted-on-www-subdomain/150896>\
**Category:** Self-hosting\
**Created:** [2020 年5 月 9 日 10:20 UTC](https://meta.discourse.org/t/correct-dns-records-to-set-when-discourse-is-hosted-on-www-subdomain/150896 "2020-05-09T10:20:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

作者： ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
发布日期： [2020 年5 月 9 日 12:19 UTC](https://meta.discourse.org/t/correct-dns-records-to-set-when-discourse-is-hosted-on-www-subdomain/150896/2 "2020-05-09T12:19:31Z")

</div>

Discourse 仅为 www 地址生成了证书。如果您通过 HTTP 访问根域名，会按预期被重定向；但如果您通过 HTTPS 访问，则会收到错误。

有一些关于如何为两个域名生成证书的讨论。您可以查看 [forcewww.com](http://forcewww.com)，那样会更简单。

---

_[View the full topic](https://meta.discourse.org/t/correct-dns-records-to-set-when-discourse-is-hosted-on-www-subdomain/150896)._
