# 刚刚从我的 URL 中移除了子域名

**URL:** <https://meta.discourse.org/t/just-removed-the-subdomain-from-my-url/133404>\
**Category:** Support\
**Created:** [2019年十一月14日 16:03 UTC](https://meta.discourse.org/t/just-removed-the-subdomain-from-my-url/133404 "2019-11-14T16:03:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![orchardstreet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/orchardstreet/32/149531_2.png) [@orchardstreet](https://meta.discourse.org/u/orchardstreet)\
**Post date:** [2019年十一月14日 16:03 UTC](https://meta.discourse.org/t/just-removed-the-subdomain-from-my-url/133404/1 "2019-11-14T16:03:19Z")

</div>

Discourse 的说明似乎鼓励使用子域名，但这让我的网址变得过长，因此在使用一年后我移除了子域名。有人知道如何处理我之前使用子域名期间来自 Google 的流量吗？

我应该将子域名作为基础 URL 的 CNAME 记录，让来自 Google 的流量仍然指向我的网站吗？还是直接删除所有与之前子域名相关的 DNS 记录，以便 Google 能更快地重新索引？

---

<div class="post-metadata">

**Author:** ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)\
**Post date:** [2019年十一月14日 16:14 UTC](https://meta.discourse.org/t/just-removed-the-subdomain-from-my-url/133404/2 "2019-11-14T16:14:48Z")

</div>

最好的方法可能是将您之前的子域名设置 301 重定向到新域名。这样可以确保所有指向旧 URL 的流量都能正确转发。

---

<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:** [2019年十二月14日 16:28 UTC](https://meta.discourse.org/t/just-removed-the-subdomain-from-my-url/133404/3 "2019-12-14T16:28:50Z")

</div>

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