Bully aliasdomain

Discussion in 'ISPConfig 3 Priority Support' started by aldo, Apr 3, 2014.

  1. aldo

    aldo Member HowtoForge Supporter

    Yesterday I created a new website with two domains; one configured in the website (mydomain.com) and the other as aliasdomain for website (mydomain.net) with "Parent website" = mydomain.com (see (1) ).

    The problem is that typing mydomain.com in web browser address, users are redirected to mydomain.net while I would the opposite or no redirect occurs.

    I already tried to delete and recreate the aliasdomain but not resolved.

    The strange thing is that if I delete aliasdomain (mydomain.net) web site domain (mydomain.com) continues to point to the alias (mydomain.net); but since this does not exist, another site appears among those on the server but totally foreign.

    Please note that on this server I have another similar situation (2 domians / 1 website) fully functional.

    More information:
    ISPConfig 3.0.5.3 / Debian 7.4

    (1) Aliasdomain configutarion:
    Aliasdomain = mydomain.net
    Parent Website = mydomain.com
    Redirect Type =
    Redirect Path
    Auto-Subdomain = none
    SEO Redirect =
    Active = checked

    I tried different Redirect Type but nothing changes.

    Thanks for any help.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats the intended behaviour of a alias domain, it is an alias for the website, so you get the same content when you enter the domain of the website or the aliasdomain.

    If you want to get a redirect, then go to the redirect tab of the alias domain, select redirect tyle "R=301,L" and enter "http://www.mydomain.com" in the redirect path field.

    This happens because you deleted the aliasdomain in apache but not in dns. if a dns record points to a apache webserver and this apache webserver does not know this domain (because it is not added as website or aliasdomain), then apache will show the first website in alphabetical order that uses the same IP then the non existing site.
     
  3. aldo

    aldo Member HowtoForge Supporter

    Thank you Till, but if the alias is mydomain.net and I set redirect type "R=301,L", I expect that mydomain.net point to mydomain.com not vice versa
    as is happening.

    Also, if I choose "No redirect" in aliasdomain why the main domain goes to aliasdomain?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    A redirect requires that you set a redirect target. if you dont set one, then the redirect is ignored and the content of the website is shown.

    Because its an alias. A alias instructs apache to show the same content for the alias domain and the website domain without doing any redirect.
     
  5. arraken

    arraken Member

    Hi!

    I have a similar problem, but with nginx. When I visit a domain that points to my webserver, but has no website in ISPConfig, I get redirected to a site that belongs to a client.

    You said that apache automatically redirects to the first vhost in alphabetical order. How does this work in nginx? I tried to create a 000-default.tld vhost, but I still get redirected to the customers website.
     
  6. aldo

    aldo Member HowtoForge Supporter

    I'm sorry but I do not understand.

    I have another pair of domains that are configured in the same manner and on the same server that works as expected.

    If I set
    Redirect Path = http://mydomain.com
    in aliasdomain, I get a redirect loop in the browser.
     
  7. aldo

    aldo Member HowtoForge Supporter

    Maybe it is not considered an important clue.

    If I delete the aliasdomain (then forget it for a moment) the website through the main domain (mydomain.com) is no longer visible and another site appears in its place.

    mydomain.com is not an aliasdomain but configured in website.
     
  8. aldo

    aldo Member HowtoForge Supporter

    I am truly sorry.

    The customer installed Prestashop and configured the alias domain as the main domain. So the redirect was performed by Prestashop iself. :mad:

    I'm sorry for having wasted your time.
     

Share This Page