# 您的 Discourse 主机名？（example.discourse.com）

**URL:** https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990
**Category:** Self-hosting
**Created:** [2020年五月10日 22:12 UTC](https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990 "2020-05-10T22:12:24Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![Walid\_Riachy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/walid_riachy/32/179947_2.png) [@Walid\_Riachy](https://meta.discourse.org/u/Walid_Riachy)
#### Post date: [2020年五月10日 22:12 UTC](https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990/1 "2020-05-10T22:12:24Z")

</div>

大家好，

我是新用户，刚在 DigitalOcean 上购买了计划来托管我的 Discourse 论坛。

我在 DigitalOcean 控制台中完成了安装流程，系统要求我输入 Discourse 的主机名。请问如何以及在哪里获取这个主机名？

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [2020年五月10日 22:21 UTC](https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990/2 "2020-05-10T22:21:26Z")

</div>

你好！

您需要输入您的域名。例如，本论坛的域名是 [meta.discourse.org](http://meta.discourse.org)。

如果您还没有域名，需要购买一个。DigitalOcean 不提供域名服务。

---

<div class="post-metadata">

### Author: ![maiki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/maiki/32/233950_2.png) [@maiki](https://meta.discourse.org/u/maiki)
#### Post date: [2020年五月10日 22:22 UTC](https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990/3 "2020-05-10T22:22:08Z")

</div>

您需要注册一个域名用于您的论坛。

---

<div class="post-metadata">

### Author: ![ashishprajapati](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ashishprajapati/32/179871_2.png) [@ashishprajapati](https://meta.discourse.org/u/ashishprajapati)
#### Post date: [2020年五月10日 22:24 UTC](https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990/4 "2020-05-10T22:24:08Z")

</div>

> [@Walid\_Riachy](#):
>
> 我在 DigitalOcean 控制台中完成了安装流程，系统提示我输入 Discourse 的主机名。请问该如何获取该主机名，以及在哪里可以找到它？

您好，

如果您还没有域名，我认为您需要先购买一个域名。

如果您已经购买了一个域名，请直接在那里输入它，例如 [example.com](http://example.com)（即您自己的域名）。

温馨提示：请确保您已在域名的 DNS 设置中的_A 记录_处添加了 DigitalOcean 服务器的 IP 地址。这样，您的 **域名** 才能指向 **Discourse 服务器（DigitalOcean 服务器）** 。

谢谢，  
Ashish P.

---

<div class="post-metadata">

### Author: ![Walid\_Riachy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/walid_riachy/32/179947_2.png) [@Walid\_Riachy](https://meta.discourse.org/u/Walid_Riachy)
#### Post date: [2020年五月10日 22:37 UTC](https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990/5 "2020-05-10T22:37:43Z")

</div>

你好，非常感谢你的回复。@ashish，你能通过 TeamViewer 帮我处理一下吗？

我输入了域名后，系统报了一些错误，我想可能是我的 Namecheap 账户配置不正确。

非常感激你的帮助。

---

<div class="post-metadata">

### Author: ![sunjam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunjam/32/175682_2.png) [@sunjam](https://meta.discourse.org/u/sunjam)
#### Post date: [2020年五月10日 22:48 UTC](https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990/6 "2020-05-10T22:48:01Z")

</div>

供参考，您也可以从域名提供商处获得指导。既然您已经向他们付费，他们的支持团队应该会乐意引导您完成整个流程。至少，像 Namecheap 和 Gandi 这样的提供商就是这样。

---

<div class="post-metadata">

### Author: ![ashishprajapati](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ashishprajapati/32/179871_2.png) [@ashishprajapati](https://meta.discourse.org/u/ashishprajapati)
#### Post date: [2020年五月10日 23:13 UTC](https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990/7 "2020-05-10T23:13:50Z")

</div>

> [@Walid\_Riachy](#):
>
> 你好，非常感谢你的回复。@ashish，你能通过 TeamViewer 帮我解决这个问题吗？
> 
> 我输入了域名后出现了一些错误，我想可能是 Namecheap 的配置不正确。
> 
> 非常感激你的帮助。

好的。你能否与你的 DNS 服务提供商沟通，请他们协助解决此问题？

或者你也可以聘请一位自由职业开发者来帮忙。

谢谢，  
Ashish P.

---

<div class="post-metadata">

### Author: ![Walid\_Riachy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/walid_riachy/32/179947_2.png) [@Walid\_Riachy](https://meta.discourse.org/u/Walid_Riachy)
#### Post date: [2020年五月10日 23:16 UTC](https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990/8 "2020-05-10T23:16:50Z")

</div>

我已经成功安装了，这正是我需要的。

> [你的 Discourse 主机名？（例如：example.discourse.com）](https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990)

这基本上是指 Discourse 在终端开始安装之前，在页面底部要求你提供的主机名。在我的情况下，我填写的是 [forum.example.com](http://forum.example.com)。

我现在已完成安装，终端提示我需要在网站上继续安装。我尝试访问我的网站链接，但它将我重定向到一个页面，显示该域名最近是从 Namecheap 购买的。

我正在尝试解决与 Namecheap 相关的问题。

非常感谢大家。

---

<div class="post-metadata">

### Author: ![ashishprajapati](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ashishprajapati/32/179871_2.png) [@ashishprajapati](https://meta.discourse.org/u/ashishprajapati)
#### Post date: [2020年五月10日 23:21 UTC](https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990/9 "2020-05-10T23:21:01Z")

</div>

> [@Walid\_Riachy](#):
>
> 这基本上是在终端开始安装之前，Discourse 要求你在页面底部提供的主机名。在我的情况下，我输入了 [forum.example.com](http://forum.example.com)。
> 
> 我现在已完成安装，终端提示我需要在网站上继续安装。我尝试访问我的网站链接，但它将我重定向到一个页面，显示该域名最近从 Namecheap 购买。

根域名（例如 [example.com](http://example.com)）或子域名（例如 [forum.example.com](http://forum.example.com)）都可以。你可以选择其中一个。只需与 DNS 提供商沟通，他们会告诉你如何将服务器 IP 地址输入到域名或子域名的 A 记录中。这个问题很容易解决：slight\_smile:

---

<div class="post-metadata">

### Author: ![Walid\_Riachy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/walid_riachy/32/179947_2.png) [@Walid\_Riachy](https://meta.discourse.org/u/Walid_Riachy)
#### Post date: [2020年五月10日 23:21 UTC](https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990/10 "2020-05-10T23:21:08Z")

</div>

Namecheap 客服问我是否获得了 DigitalOcean 托管服务器的 IP 地址，有人知道如何获取吗？

---

<div class="post-metadata">

### Author: ![ashishprajapati](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ashishprajapati/32/179871_2.png) [@ashishprajapati](https://meta.discourse.org/u/ashishprajapati)
#### Post date: [2020年五月10日 23:22 UTC](https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990/11 "2020-05-10T23:22:25Z")

</div>

是的，你应该拥有 DigitalOcean 服务器的 IP 地址。请使用你的凭证登录 DigitalOcean 网站，即可在那里找到它 🙂

---

<div class="post-metadata">

### Author: ![Walid\_Riachy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/walid_riachy/32/179947_2.png) [@Walid\_Riachy](https://meta.discourse.org/u/Walid_Riachy)
#### Post date: [2020年五月11日 00:06 UTC](https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990/12 "2020-05-11T00:06:50Z")

</div>

![Screen Shot 2020-05-11 at 4.04.56 AM](https://global.discourse-cdn.com/meta/original/3X/6/f/6f44791e3056dca856b795ae8e32d7296fc71255.png)

我已经在我的域名中设置了这些名称服务器，这就是全部需要做的吗？Namecheap 支持人员让我向 DigitalOcean 咨询，是否可以通过主机记录将域名与他们的服务连接。

当我访问我的网站时，仍然被重定向到 Namecheap 的页面，显示“该域名已购买”。

---

<div class="post-metadata">

### Author: ![ashishprajapati](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ashishprajapati/32/179871_2.png) [@ashishprajapati](https://meta.discourse.org/u/ashishprajapati)
#### Post date: [2020年五月11日 00:25 UTC](https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990/13 "2020-05-11T00:25:58Z")

</div>

> [@Walid\_Riachy](#):
>
> 我已在我的域名中设置了这些名称服务器，这是否就是我需要做的全部？Namecheap 支持人员让我询问 DigitalOcean，是否可以通过主机记录将域名与其服务连接。
> 
> 当我访问我的网站时，仍然被重定向到 Namecheap 的页面，提示“该域名已购买”。

将您的 **DNS 名称服务器** 映射到 **DigitalOcean** 并非必需。您只需要在域名的 **A 记录** 中添加 DigitalOcean 服务器的 IP 地址即可。（我在之前的帖子中已提到过这一点）

**如下所示：** - 只需完成此操作。

```plaintext
A 记录 | @ | 11.22.33.44

```

仅供参考：11.22.33.44 是一个示例 IP 地址。您应该使用您服务器的类似公网 IP 地址。

**[请立即按以下步骤操作]**  
既然您现在已将域名的名称服务器映射到 DigitalOcean，请前往 **DigitalOcean 的控制面板** ，然后：

- 进入“网络”\>“域名”
- 添加新域名
- 进入“网络”并点击您的域名
- 为该域名创建新的 A 记录。DigitalOcean 将提供选项供您选择 **Droplet 的 IP** （因此您无需手动输入）。

**现在，您已完成** 👏

**请查看以下链接以获取更多信息：**

> [@Configure your domain name for hosted Discourse](https://meta.discourse.org/t/configure-your-domain-name-for-hosted-discourse/21827):
>
> bookmark This guide explains how to configure a custom domain name for a site hosted by Discourse. This option is available for our Pro, Business, and Enterprise plans. person_raising_hand Required user level: Administrator So you’ve selected a hosted Discourse plan. Lucky you! The very first step is to point your domain name forum.example.com to our hosting. You will need to edit the DNS records for your domain name, example.com. In most cases, the DNS is controlled from the sa…

[https://top5hosting.co.uk/blog/uk-hosting/361-connecting-a-godaddy-domain-with-digitalocean-droplet-step-by-step-guide-with-images](https://top5hosting.co.uk/blog/uk-hosting/361-connecting-a-godaddy-domain-with-digitalocean-droplet-step-by-step-guide-with-images)

---

<div class="post-metadata">

### Author: ![Walid\_Riachy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/walid_riachy/32/179947_2.png) [@Walid\_Riachy](https://meta.discourse.org/u/Walid_Riachy)
#### Post date: [2020年五月11日 00:40 UTC](https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990/14 "2020-05-11T00:40:48Z")

</div>

是的，我已经按照所有这些步骤操作了，非常感谢。不过我想我需要等一段时间，因为 DNS 生效中，论坛仍然无法加载。

Ashish，我尝试在 Instagram 上给你发过消息。我计划在未来执行一个项目，可能需要你的帮助，我需要一位专业开发者的协助。

---

<div class="post-metadata">

### Author: ![ashishprajapati](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ashishprajapati/32/179871_2.png) [@ashishprajapati](https://meta.discourse.org/u/ashishprajapati)
#### Post date: [2020年五月11日 00:58 UTC](https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990/15 "2020-05-11T00:58:34Z")

</div>

> [@Walid\_Riachy](#):
>
> 是的，我刚刚按照所有这些步骤操作了，非常感谢。但我想我需要等待一段时间，因为 DNS 尚未生效，论坛仍然无法加载。

是的，没错。您需要等待一段时间，以便 DNS 更改生效。

谢谢

---

<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: [2020年六月10日 00:58 UTC](https://meta.discourse.org/t/hostname-for-your-discourse-example-discourse-com/150990/16 "2020-06-10T00:58:35Z")

</div>

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