Directadmin change hostname

2013年05月08日 / 技术相关 / 标签:directadmin,hostname

The hostname is the name you give your server. It needs to be a fully qualified domain name, meaning it needs to resolve, and should resolve to your server IP.

The value of your hostname should be in the form similar to:

where you run/manage (usually something like your webhost domain). The value "server" or something like that needs to be in front of it. (ns1 or www are both valid). You cannot use just "" as the hostname, as this will conflict with the email in your actual hosting account (with regards to how system accounts get their emails).

To change your hostname:
(1) Go to:

Admin Level -> Admin Settings -> Server's Hostname

set it there, and allow 1 minute for DA to restart.

(2) The hostname must resolve, so go to:

Admin Level -> DNS Administration -> Add Zone

and create an entire new zone:

Domain Name:
IP Address: (your server IP)

where is your new hostname, the server IP address will usually be your license/main IP, and the ns1/ns2 values can be whatever your uses. Leave the "Create Reverse IP Lookup" checkbox disabled/unchecked.
The reason we add a new zone for the hostname is to ensure that
-- it resolves
-- it has it's own MX record, so email from the hostname are valid. Without the MX records, many of your emails (eg: from the php/apache "mail()" function) may be rejected.






  • php: 感谢可以用了
  • 厉害了!: 厉害了!!!真的可以安装运行了。
  • 赵赵: 还是不行 求大佬指导
  • 受害人: 感谢 十分感谢
  • 过路人: 这个方法很管用,直接安装多次都是失败 按照楼主的法子一次就搞定。谢谢!
  • yjl: 很久没更新了?
  • 阿策阳光: 博主威武,完美的解决了问题。
  • servers: 基本上很少用电信联通的了,太贵