【问题标题】:How can I redirect all subdomain to main domain with dns wildcard?如何使用 dns 通配符将所有子域重定向到主域?
【发布时间】:2013-04-23 23:02:12
【问题描述】:

我想像这样重定向所有子域:

test.website.com 到 www.website.com。

我使用带有共享 IP 和 PLESK 控制面板的 IIS 服务器。

当我添加这样的 cname dns 记录时:*.website.com website.com 所有子域都重定向到服务器 IP 并显示 plesk 默认页面!!

有什么解决办法吗?

【问题讨论】:

    标签: dns subdomain plesk


    【解决方案1】:

    2016 年更新

    Windows 2016 中的 IIS 10 支持 wildcard host header,您可以在 Plesk 17 中创建通配符子域。

    原始答案

    您可以将域设置为 IP 地址的默认域:

    IIS 上无法创建通配符子域:http://kb.parallels.com/en/2239

    如果您尝试在 IIS 网站上创建通配符绑定,您将获得:

    ---------------------------
    Add Site Binding
    ---------------------------
    The specified host name is incorrect. The host name must use a valid host name format and cannot contain the following characters: "/\[]:|<>+=;,?*$%#@{}^`. Example: www.contoso.com.
    ---------------------------
    OK   
    ---------------------------
    

    所以,plesk 运行正常 - 您创建了 DNS 记录 *.website.com,但没有可以处理此类请求的虚拟主机,它们回退到默认虚拟主机。

    【讨论】:

      猜你喜欢
      • 2012-07-08
      • 2018-02-05
      • 1970-01-01
      • 2019-10-23
      • 2014-09-29
      • 1970-01-01
      • 2016-03-14
      • 2018-04-08
      • 1970-01-01
      相关资源
      最近更新 更多