# 別のホスティングで既に使用されているドメインにDiscourseをインストールすることは可能ですか？

**URL:** https://meta.discourse.org/t/is-it-possible-to-install-discourse-on-a-domain-already-in-use-on-another-hosting/156156
**Category:** Self-hosting
**Created:** [2020 年 6 月 28 日午前 8:23 UTC](https://meta.discourse.org/t/is-it-possible-to-install-discourse-on-a-domain-already-in-use-on-another-hosting/156156 "2020-06-28T08:23:03Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![nory](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nory/32/173397_2.png) [@nory](https://meta.discourse.org/u/nory)
#### Post date: [2020 年 6 月 28 日午前 8:23 UTC](https://meta.discourse.org/t/is-it-possible-to-install-discourse-on-a-domain-already-in-use-on-another-hosting/156156/1 "2020-06-28T08:23:03Z")

</div>

こんにちは、  
現在、`example.com` は共有ホスティング上にあり、DNS などはそのホスティングで使用できるよう設定されています。

Discourse を別のホスティング（Digital Ocean）にインストールしたいと考えています。

Discourse のインストール時にフォーラムをどのドメインに設置するかを尋ねられます。ここで、他のホスティング上の `example.com` を指定し、その後、自分の PC の hosts ファイルの IP を変更して、そのドメイン上で Discourse のインストールを確認することは可能でしょうか？私だけが見られる状態にしたいのですが、私の意図が伝わっているか分かりません。

現状、私のドメインは別のホスティング（Flarum が設置されている場所）にあります。ドメインを移動させずに、まずは Digital Ocean 上で Discourse を試して、使用できるかどうかを確認したいと考えています。

よろしくお願いいたします！

---

<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 年 6 月 28 日午前 9:18 UTC](https://meta.discourse.org/t/is-it-possible-to-install-discourse-on-a-domain-already-in-use-on-another-hosting/156156/2 "2020-06-28T09:18:11Z")

</div>

すでに他のホスティングプラットフォームで使用しているルートドメインを、新しいホスティングでは使用することはできません。

もちろん、ルートドメインを2つの場所で同時に使うことはできません 🙂

新しいサブドメインを作成し、新しいサーバー/ホスティングのIPをマップしてください。そうすれば、ご要望のケースに対応できます。具体的には、DNS設定で「forum」などの新しいAレコードを追加し、そこにホスティングのIPアドレスを指定するだけです。

これにより、Discourseフォーラムを `forum.example.com` というサブドメインURLでホスティングできるようになります。

（この方法であれば、ファイルを移動する必要はありません。DNS設定に1つのエントリを追加するだけで済みます）

🙂

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [2020 年 6 月 28 日午前 10:11 UTC](https://meta.discourse.org/t/is-it-possible-to-install-discourse-on-a-domain-already-in-use-on-another-hosting/156156/3 "2020-06-28T10:11:23Z")

</div>

現在の共有ホスティングプロバイダーとは1つの契約を結んでいますが、実際には以下の2つのサービスを提供されています：

- ドメインのDNS
- Webホスティング（現在はルートドメイン名、あるいは`www.example.com`でFlarumに使用されています）

別のプロバイダーでDiscourseを簡単にインストール、または取得し、DNSにホスト名レコード（例：`forum.example.com`）を追加して、その追加のDiscourseプロバイダーを指すように設定することができます。

---

<div class="post-metadata">

### Author: ![nory](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nory/32/173397_2.png) [@nory](https://meta.discourse.org/u/nory)
#### Post date: [2020 年 6 月 28 日午前 10:17 UTC](https://meta.discourse.org/t/is-it-possible-to-install-discourse-on-a-domain-already-in-use-on-another-hosting/156156/4 "2020-06-28T10:17:55Z")

</div>

ありがとうございます！では、今後 `forum.example.com` から `example.com` にフォーラムのルートを変更することは可能でしょうか？

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [2020 年 6 月 28 日午前 10:34 UTC](https://meta.discourse.org/t/is-it-possible-to-install-discourse-on-a-domain-already-in-use-on-another-hosting/156156/5 "2020-06-28T10:34:40Z")

</div>

それには強く反対し、代わりに `www.example.com` を使用することをお勧めしますが、はい、それは完全に可能です。

_[この記事](https://www.yes-www.org/why-use-www/)では、いわゆるナケッドドメインを使用することがなぜ好ましくないのかについて詳しく説明しています。_

---

<div class="post-metadata">

### Author: ![nory](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nory/32/173397_2.png) [@nory](https://meta.discourse.org/u/nory)
#### Post date: [2020 年 6 月 28 日午前 10:37 UTC](https://meta.discourse.org/t/is-it-possible-to-install-discourse-on-a-domain-already-in-use-on-another-hosting/156156/6 "2020-06-28T10:37:22Z")

</div>

そして、Flarum には `example.com` を（一時的に）、Discourse の試行には `www.example.com` を使うことはできますか？:x

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [2020 年 6 月 28 日午前 11:29 UTC](https://meta.discourse.org/t/is-it-possible-to-install-discourse-on-a-domain-already-in-use-on-another-hosting/156156/7 "2020-06-28T11:29:24Z")

</div>

以前と同じ理由で、それはお勧めしません。むしろ、より理にかなわないでしょう 😉 ですが、もちろん、そのようにすることも可能です。
