bmcpanel

Well-Known Member
Jun 1, 2002
544
0
316
I have a site on my web server that resolves correctly when you type in the domain without the www, but when you type in the domain name WITH www, it resolves to an incorrect IP on the server.

Ex.
www.domain.com ----& Wrong IP resolves
domain.com -----& Resolve correctly

I have done nslookup to verify that it resolves incorrectly when typing in &www& before the domain name. nslookup shows proper output without &www& before the domain.

I have checked the dns record in /var/named . I have rebooted http, DNS and I have rebooted the server. However, the problem persists. I have even changed the IP number in WHM hoping to overwrite any incorrect settings, but to no avail.

Oh, and this is not a dns propagation issue after a DNS update. This domain has existed on this server for over 1 month and nothing has changed with the DNS at the registrar.

Does anyone have any advice?
 

bmcpanel

Well-Known Member
Jun 1, 2002
544
0
316
For anyone who is interested, I have found the problem.

It seems this account was initially added incorrectly through WHM with the www in front of the domain which is incorrect.

Instead of creating the account as

domain.com

it was created incorrectly as

www.domain.com

which created a file in /var/named called

www.domain.com.db

The domain was deleted and re-added correctly as &domain.com&, but this then created two separate records

domain.com.db
www.domain.com.db

Further complicating this issue, both records had different IP # with domain.com.db having the correct IP #, and thus, www.domain.com did not resolve correctly after the addition of the new record &domain.com.db&.