The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Wrong Domain Name

Discussion in 'General Discussion' started by JonMarkGo, Oct 15, 2007.

  1. JonMarkGo

    JonMarkGo Active Member

    Joined:
    Sep 14, 2005
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    I have a variety of domain names on my server. But for some reason, when people ping it, they don't get my main one. They get one of my resellers instead. How do I fix this so my main domain shows up as being attached to that IP?
     
  2. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    Although it seems unrelated, I think the domain in the ping response depends on your Apache configuration. The first domain defined for a given IP address is the one that is listed in the ping response. So, simply reorder the VirtualHost entries in your httpd.conf, restart Apache and you should be good ;)
     
  3. JonMarkGo

    JonMarkGo Active Member

    Joined:
    Sep 14, 2005
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Looks like the domain showing up in ping isn't the first in the conf...
     
  4. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    Maybe my suggestion was not clear -- I meant the first domain (VirtualHost) for the given IP address. There may be other VirtualHosts for other IP addresses defined before this one, but that should not matter.

    Or maybe I am just simply wrong about this :eek:
     
  5. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    It did indeed miss the mark by a mile. I checked on this side and have found it has to do with reverse DNS (that would make much more sense). If a PTR record exist for the IP address (of the domain you are pinging), that name is retuned.
     
  6. JonMarkGo

    JonMarkGo Active Member

    Joined:
    Sep 14, 2005
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    I understood what you meant :P There are other domains with the same ip/port before it.
     
  7. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    You can check the PTR record for the IP address as follows (replace with your domain's IP address):
    Code:
    dig -x 123.45.67.89
     
  8. JonMarkGo

    JonMarkGo Active Member

    Joined:
    Sep 14, 2005
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    I got the same domain in that that I do in ping, but it still doesn't explain how to fix it :(
     
Loading...

Share This Page