www.domain(dot)com is redirecting to sub.domain(dot)com

Discussion in 'General' started by Johnny Curtis, Jan 10, 2017.

  1. Johnny Curtis

    Johnny Curtis New Member

    I have no idea how this happened. I had my main domain.com up and running for almost a year and just recently added sub.domain.com ... both were running fine for a few days until I decided to add an SSL cert to www.domain.com to get rid of an 'insecure content' error. Everything now redirects to sub.domain.com
    I added the subdomain by adding a new website. I didn't use the subdomain or alias methods.
    If I deactivate sub.domain.com through ispconfig, I have access to www.domain.com again.
    I am using a wordpress installation for both domain.com and sub.domain.com and wordpress is set to use https://www.domain.com and https://sub.domain.com as the addresses for the sites.
    Where to start?
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Check the ip addresses of the two websites, you probably have an ip address under sub.domain.com and '*' for the address under www.domain.com. Just set them both to the same thing (probably '*').
  3. Johnny Curtis

    Johnny Curtis New Member

    Okay it turns out it was the fact that I was using an old SSL cert that I had generated a while back. I had probably used domain.com and not domain.com plus www.domain.com
    Apache didn't like the cert. Made a new one and everything works just fine now.

Share This Page