# Switching forum from subdomain to sub directory

**URL:** https://meta.discourse.org/t/switching-forum-from-subdomain-to-sub-directory/59845
**Category:** Support
**Created:** [3월 24, 2017, 1:43오후 UTC](https://meta.discourse.org/t/switching-forum-from-subdomain-to-sub-directory/59845 "2017-03-24T13:43:18Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![alwayslookright](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@alwayslookright](https://meta.discourse.org/u/alwayslookright)
#### Post date: [3월 24, 2017, 1:43오후 UTC](https://meta.discourse.org/t/switching-forum-from-subdomain-to-sub-directory/59845/1 "2017-03-24T13:43:18Z")

</div>

Does anyone have advice on how to switch a current Discourse forum from a subdomain to a sub directory? I’d like to know how to do this and also how to ensure all redirects of the old URLs point to the new locations.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [3월 25, 2017, 1:17오전 UTC](https://meta.discourse.org/t/switching-forum-from-subdomain-to-sub-directory/59845/2 "2017-03-25T01:17:26Z")

</div>

We don’t recommend this as it is a much more complex setup.

---

<div class="post-metadata">

### Author: ![alwayslookright](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@alwayslookright](https://meta.discourse.org/u/alwayslookright)
#### Post date: [3월 25, 2017, 4:04오전 UTC](https://meta.discourse.org/t/switching-forum-from-subdomain-to-sub-directory/59845/3 "2017-03-25T04:04:54Z")

</div>

You mean you don’t recommend switching or don’t recommend subfolders instead of subdomains? As much as I’d agree switching might not be fun, I’ve got forums in their infancy so think it’s best to switch from forum.domain to domain/forum

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [3월 25, 2017, 8:24오전 UTC](https://meta.discourse.org/t/switching-forum-from-subdomain-to-sub-directory/59845/4 "2017-03-25T08:24:17Z")

</div>

Subfolder is much more complex to setup and maintain. Also, it has not advantage whatsoever compared to subdomain (which is much simpler to setup and maintain)

---

<div class="post-metadata">

### Author: ![alwayslookright](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@alwayslookright](https://meta.discourse.org/u/alwayslookright)
#### Post date: [3월 26, 2017, 12:16오전 UTC](https://meta.discourse.org/t/switching-forum-from-subdomain-to-sub-directory/59845/5 "2017-03-26T00:16:54Z")

</div>

As long as it can be done. Subdomain is treated like another domain and sub folder is probably better for SEO to strengthen the domain.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [3월 26, 2017, 12:26오전 UTC](https://meta.discourse.org/t/switching-forum-from-subdomain-to-sub-directory/59845/6 "2017-03-26T00:26:37Z")

</div>

This is absolutely _not true_, per Matt Cutts of Google. You can search here for the term “cutts” to learn more.

Lots of SEO 🐍 🛢 out there..

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [3월 26, 2017, 12:27오전 UTC](https://meta.discourse.org/t/switching-forum-from-subdomain-to-sub-directory/59845/7 "2017-03-26T00:27:07Z")

</div>

In terms of SEO, no “probably better” about it.  
The recommendation is to use whichever is easiest.

[![](https://global.discourse-cdn.com/meta/original/4X/b/f/6/bf6632bb51db556c0806f88d0c4dbcb28f9aefa7.jpeg "Should I structure my site using subdomains or subdirectories?") ](https://www.youtube.com/watch?v=_MswMYk05tk)

---

<div class="post-metadata">

### Author: ![alwayslookright](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@alwayslookright](https://meta.discourse.org/u/alwayslookright)
#### Post date: [3월 26, 2017, 12:42오전 UTC](https://meta.discourse.org/t/switching-forum-from-subdomain-to-sub-directory/59845/8 "2017-03-26T00:42:38Z")

</div>

I’d still like to switch and know if there are any guidelines or tips on maybe copying the existing forum, setting up a new one on a sub folder. I’m sure it is more work but that is fine. The reason for the switch is for SEO but if we want to argue whether it is a sound one or not that is going to derail this thread. I don’t mind arguing my reasons but that’s not going to help me learn how it can be done or for any tips or suggestions on it.

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [3월 26, 2017, 4:53오후 UTC](https://meta.discourse.org/t/switching-forum-from-subdomain-to-sub-directory/59845/9 "2017-03-26T16:53:36Z")

</div>

If you _really_ like shooting yourself in the foot, these guides should help you to aim:

> [@Serve Discourse from a subfolder (path prefix) instead of a subdomain](https://meta.discourse.org/t/subfolder-support-with-docker/30507):
>
> warning Discourse Official Statement about Subfolder setup We support subfolder setups for our hosted customers at the enterprise level and up. Due to heavy technical setup complexity we strongly recommend you do not use this setup unless you are very experienced in custom subfolder setups. It is critical you have a deep understanding of NGINX setup in the Discourse Docker container Secure original IP forwarding using custom headers in the proxy chain Rate limiting in front proxy server I…

> [@Change the domain name or rename your Discourse](https://meta.discourse.org/t/change-the-domain-name-or-rename-my-discourse/16098):
>
> bookmark This guide explains how-to change the domain name of your Discourse site, and includes information about setting up DNS changes, editing configuration files, updating site settings, and correcting social logins and post content to reflect your new domain name. warning This guide is for self-hosted Discourse instances that were installed using our [installation guide on GitHub](https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md). If you are [hosted by Discourse](https://www.discourse.org/pricing), please see [Configure your domain name for hosted Discourse](https://meta.discourse.org/t/configure-your-domain-name-for-hosted-discourse/21827) for specific …

In the `remap` step, you have to find a replacement that not only updates the hostname, but also inserts the path. This will be tricky, and probably require a few restores and retries until you get it right.

---

<div class="post-metadata">

### Author: ![alwayslookright](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@alwayslookright](https://meta.discourse.org/u/alwayslookright)
#### Post date: [3월 26, 2017, 5:09오후 UTC](https://meta.discourse.org/t/switching-forum-from-subdomain-to-sub-directory/59845/10 "2017-03-26T17:09:06Z")

</div>

Appreciate the help. I can understand this might not be a fun process but just want to know what I’m looking at and have a programmer that will be helping me with it.

---

<div class="post-metadata">

### Author: ![subtenko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/subtenko/32/119524_2.png) [@subtenko](https://meta.discourse.org/u/subtenko)
#### Post date: [3월 25, 2018, 1:15오전 UTC](https://meta.discourse.org/t/switching-forum-from-subdomain-to-sub-directory/59845/11 "2018-03-25T01:15:49Z")

</div>

hmm… I was gonna go this route but now Im convinced to use subdomain. I’ll just have to do redirects from current subfolder to a new subdomain setup. thx, helped more than 1 person here

---

<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: [7월 20, 2020, 8:28오후 UTC](https://meta.discourse.org/t/switching-forum-from-subdomain-to-sub-directory/59845/12 "2020-07-20T20:28:17Z")

</div>


