URLs go to wrong sites

Discussion in 'General' started by chaloum, Mar 18, 2012.

  1. chaloum

    chaloum New Member

    Ive got a strange issue where the urls go to the wrong sites.

    Example: the server is: Mysite.com

    I have a client and site for Mysite.com this being the servers main site. So ther server is Mysite.com and the domain for the website in Mysite.com

    I have other sites configured via the server is Mysite.com and the domains are for example

    Now in the browser if I type Jim.mysite.com it goes to site3.myothersite.net

    No matter what I use to create an URL to a site that doesn't exist it defaults to site3.myothersite.net

    Other Than the server name there is no relationship between the sites, site3.myothersite.net and Mysite.com

    I don't understand why it goes to site3.myothersite.net instead of Mysite.com

    How do I fix this as its no good this way
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Check all sites and ensure that you either use * or use the IP address for all sites but dont mix IP addresses and websites. Apache will then forward all traffic for sites that dont exist to the first site that it finds in alphabetical order. So if you want that mysite.com is always found first, then chnage the domain from:

    mysite.com to 0000-mysite.com and add mysite.com as aliasdomain to the 0000-mysite.com website. The domain 0000-mysite.com does not have to exist in dns, it is just used to ensure that the site is found first in alphabetical order.
  3. chaloum

    chaloum New Member

    Thanks I lookng to is now. but from what I can remember they all use domain names not IPs
  4. chaloum

    chaloum New Member

    main site now work but other no longer accessible

    yes i did that and now for the most part main sites now work but other site are no longer accessible
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Ensure that you select the IP for all sites or * for all sites and dont mix that on a server. If you mix it, then sites become inaccessible.
  6. chaloum

    chaloum New Member

    all sites have the *

    All the sites have the *. in the auto sub domain and a * in the IPv4-Address

    I have added 0000- to the from of the two main domains



    and created a domain alias for each domain.

    I have left the other sites are are except that have the * in the appropriate locations.

    One thins I didn't mention ins that one of the domains is more like


    Im not sure if that is having an impact
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Only one site, the site that shall catch the traffic where no subdomain exists for shall have a auto subdomain set to *. Allother sites should use either auto subdomain www (if its a site like domain.tld that shall be reached as www.domain.tld as well) or no auto subdomain if the site is already a subdomain like sub.domain.tld.
  8. chaloum

    chaloum New Member


    That seem to have sorted it out


Share This Page