Domain without "www" directing to default apache website.

Discussion in 'Installation/Configuration' started by Kevin Maschke, Jun 8, 2014.

  1. Kevin Maschke

    Kevin Maschke New Member


    I recently installed ISPConfig3 and moved my website to my server.

    I have my domain at OVH and the DNS A entry points to my servers IP, while the DNS "www" CNAME points to the domain.

    Is ISPConfig I created the website with the following configuration:

    Server: My Server selected.
    IPv4: *
    Auto-subdomain: *.

    If I understand right, this way my website should respond to and also to, is this correct?

    My problem is that using I do see my site, while using I see the default apache website:

    Why is this happening? How can I solve this?
  2. SuperLOL

    SuperLOL Member

    Login into your ISPConfig and got to:
    Sites -> Click on a Website -> Web Domain -> Domain: and set "Auto-Subdomain" to "www."
    And now click on Redirect: and set "Redirect Type" to "R=301,L" and set "SEO Redirect" to "domain.tld => www.domain.tld".
  3. Kevin Maschke

    Kevin Maschke New Member

    Thank you for your reply. I've done what you suggested, but the problem still presists... :(
  4. SuperLOL

    SuperLOL Member

    You should also set 'www' as an 'A' (IPv4) record and 'AAAA' (IPv6) record in your domain.
    You can also use CNAME for that but this is normally used to point to another domain name.
    DNS changes can take 1-2 days to update worldwide.
    Last edited: Jun 8, 2014
  5. Kevin Maschke

    Kevin Maschke New Member

    I've always used "www" as an CNAME for my domain, and never had problems...

    And the problem can't be a DNS problem... Because points to my server correctly. It has to be something in ISPconfig... Because the domain name points to my server, but my server does not show the correct website. Instead of showing my website, it shows the default apache website... :(
  6. SuperLOL

    SuperLOL Member

    Check if you have "ServerAlias" in your "" file.
    And you can also use CNAME but an A/AAAA record is faster.
  7. Kevin Maschke

    Kevin Maschke New Member

    Yes, it is there.

    DocumentRoot /var/www/

    I got auto-subdomain as "www.". And if I change it to "*." the ServerAlias changes to "*".

    The problem is not "", it's "". Without the "www" I'm not directed to the website I should. It has to be a problem with ISPconfig or Apache2... :(
  8. Kevin Maschke

    Kevin Maschke New Member

    Well, thanks a lot for your help. I finally managed to solve my problem.

    In the end, the solution was as easy as:

    a2dissite 000-default
    service apache2 reload
    :D :D :D

    Should have thought about it from the beginning, because "" was showing the default apache website...
  9. SuperLOL

    SuperLOL Member

    Good that it works now, but strange i'm using debian and didn't had to do this.
  10. Solipse

    Solipse New Member

    Thanks a lot Kevin, I had this issue and all the conversations I found about it was pointless... Also I tried deleting the /etc/apache2/sites-enabled/000-default but it did nothing - alas it wasn't the right way to do it >< !

    This issue is caused by the server having the same hostname than the website entering in conflict. So between those 2 vhosts conflicting apache prefers the default one...
    It can be overiden by defining an IP associated to the website in ispconfig, but then no other website can use this IP. In my case I don't have ressource for an IP by domain...

    It would be nice that the ISPconfig script take care of that or mentioned something in the tutorials !

Share This Page