What do I do?

krissauquillo

Verified User
Joined
Mar 20, 2007
Messages
9
Okay, I was getting the following messages:

DA said:
Your hostname, ns1.vilegaming.com, and the servername you have set in DirectAdmin, ns1.vilegaming.com, do not match. It is recommended that these two values are the same.

Solution:

Either change the servername in DirectAdmin or run the 'hostname.sh' script via ssh to change your hostname

ns1.vilegaming.com, resolves to 127.0.0.1. Please make sure that your hostname resolves to your server ip (205.209.145.29) or else your email may not work correctly.

Solution:

Create an A record for your hostname (ns1.vilegaming.com.) in your DNS control panel. Point the hostname to your server's main IP address. Also check /etc/hosts to ensure that the server ip is correctly set.

Then I fixed it by going into Administrator Settings in DA, then changing Server's Hostname to vilegaming.com, then I went through SSH and ran /usr/local/directadmin/scripts/hostname.sh vilegaming.com IPADDRESS.

My question is, now that I did that fine (so emails would work correctly) what do I do with my 2 other domains that are hosted on the same VPS.
 
Hostnames do not have anything to do with the rest of your domain names hosted on the server.

You probably should not have the nameserver as the hostname. Just my opinion. I don't know of any real consequences. Hostnames are typically server.domain.com or something like that which will not be used for anything else.

When your server connects to send mail it identifies itself as server.domain.com. server.domain.com must match the main ip and the main ip must reverse to server.domain.com. The ip/hostname should be in the /etc/hosts file and you should have an A record in DNS and there should be a reverse set up for the ip address to point back to server.domain.com.

Your server identifies itself this way no matter which domain is actually sending or receiving email.
 
Well, this is what I have for one of my domains:
1-dns.jpg

My hostname is set to vilegaming.com using the /usr/local/directadmin/scripts/hostname.sh

And on my registrat at namecheap.com I have ns1.vilegaming.com/ns2.vilegaming.com pointing to my servers IP.
 
My hostname is set to vilegaming.com

That is in direct violation of the install guide located here http://www.directadmin.com/installguide.html

Important: The hostname should not be the same as the primary domain name. e.g. gary.com is not a good hostname, where server.gary.com is. Having the same host/main domain name will cause e-mail and FTP problems. Also, please make sure the hostname resolves once you setup DNS.
 
Okay I changed the hostname.sh to server.vilegaming.com and checked the /etc/hosts and it has one line with:
IP server.vilegaming.com

Then I added the following into my DNS for vilegaming.com:
server A 205.209.145.29
 
Back
Top