Name Servers are pointing to other sites on the Server?!?

TomJones

Verified User
Joined
May 9, 2004
Messages
78
I was checking my site name in Google and noticed that other sites on the server were in the search results for the site. For example, my page mysite.com/aboutmysite.html is also indexed in Google on:
ns2.othersite.com/aboutmysite.html
ns2.anothersite.com/aboutmysite.html

If I go to ns2.othersite.com or ns2.andanothersite.com, mysite.com is displayed. I think obviously my DNS records are fouled. I have mysite.com on a dedicated IP, othersite.com is also on a dedicated IP, but andanothersite.com is on a shared IP. I've checked the DNS records in the Admin Panel, nothing looks out of the ordinary.

UPDATE: so I have 7 sites on this server, if I use any site name in http://ns2.anyname it returns mysite.com's content. If I use any site name in http://ns1.anyname it returns othersite.com's content. Both mysite.com and othersite.com are on dedicated IPs, the other 5 sites are on a shared IP.

I don't want to put my actual site names or DNS records in this public post (don't want to panic my clients if they happen to stumble upon this post), but I'd be happy to PM them and any other information that might help.
 
Hello,

Make sure, you've got not empty /etc/httpd/conf/ips.conf

Do you have a proxy before Apache? NGINX? Etc?
 
Where a given site is called example.com do you have A records for ns1.example.com and/or ns2.example.com? If so, do they point to the same IP# as the A record for example.com?

And are these sites all on their own IP#s?

If so, then that's the problem, since all A records are pointing to the same IP#, and when doing IP-based hosting the sitename isn't considered. If this is the reason then you can fix the behavior by pointing to a different IP#, or by using code in .htaccess to forbid or redirect access.

Jeff
 
Thanks for the suggestions zEitEr, no proxy and ips.conf is populated.

I think you are on to my problem Jeff. I do have A records for ns1 & ns2 with each site that point to IPs they are not on (they are the IPs where the virtual nameservers were created). Should I just change the records to point to the IP of the site?
 
Make sure that you've got

Code:
NameVirtualHost IP:80
 NameVirtualHost IP:443

with IP replaced to your real IP in ips.conf

Might be the same case: http://forum.directadmin.com/showthread.php?t=45848

Whatever your NS1 and NS2 points, you should not see a site if the ips.conf is correct (Name Based hosting as opposite of IP-based hosting). All what you should see there is "Apache is functioning normally", shouldn't you? Please correct my somebody if I'm wrong.
 
I changed ns1 & ns2 on my two dedicated IP sites to their respective IPs last night, everything is working now. On my shared IP sites, I changed ns1 & ns2 to the shared IP, but if I go to ns1.sharedsite.com (or ns2) for any of those sites I get a 403 forbidden error for all of them. Since it's name-based hosting on those sites, should I just delete the A records for ns1 & ns2 on those?
 
There are lots of uses of A records besides just for websites </obvious>.

But you don't need A records for ns1 and for ns2 for each domain unless your users are setting them up at their domain registrars. Hopefully you've never told your users to do that, and none of your users point to their own namesevers, but instead point to your nameserver names.

In that case, then yes, you can remove the A records for ns1.EXAMPLE.com and for ns2.EXAMPLE.com, except of course for the names of your published nameservers.

Jeff
 
Back
Top