Vhost domain redirects to same domain

Discussion in 'Installation/Configuration' started by nygage, Aug 14, 2018.

  1. nygage

    nygage New Member

    Hello, I'm having several problems with the domains in ispconfig3, firs of all i'l expose my case:
    I have a server with one ip, i'm triying to use more than one domain with https, I create the first domain and the let's Encrypt SSL certificate, no problem, i create the second one, same process and the first problem is: The second domain redirects to the first one, why?
    Second problem, if I enter by http both redirects to apache2 default page but if i enter de domain with www it redirects to https (I checked the redirect to https on ispconfig).

    In conclusion:
    h**p : // domain1 => apache2 default page
    h**p : // domain2=> apache2 default page
    h**p: // w ww.domain1 => h* *ps: // domain1 (All good)
    h**p:// www. domain2=> h**ps://domain1 content, but same domain on browser

    Can you help me?

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    1) Ensure that you entered 'domain.tld' and not 'www.domain.tld' into the domain field of the website and ensure that auto subdomain is set to 'www'.
    2) The second domain probably redirects to the first one when https is used because no Let's encrypt SSL cert for the second domain could be issued. Check the website settings, the SSL and let's encrypt checkboxes of domain2 are probably not enabled anymore. An LE SSL cert cannot be issued when LE is unable to connect to the domain name. See also: https://www.howtoforge.com/community/threads/lets-encrypt-error-faq.74179/
  3. nygage

    nygage New Member


    Thanks for your quick reply:

    1. Yes is set as domain*tld and the auto subdomain is in www
    2. okay, so we have to solve first the first one.
  4. nygage

    nygage New Member

    Solved! the problem was there is a line in host file to resolve the ip of the server to the first domain, remove the line, clean cache and all works, thanks!

Share This Page