Aliasdomain redirect not working

Discussion in 'Installation/Configuration' started by SuperLOL, Jan 1, 2021.

  1. SuperLOL

    SuperLOL Member

    Hi,
    I created two Alias-Domains in the ISPConfig option to redirect the "domain3.com" and "domain2.com" to "domain1.com" (R,L). But the only thing i dose is displaying the website on all domains without any redirects.
    The only thing i could get this to work was to create a Redirect Path "/domain-redirect/" that has a .htaccess file in it with a redirect code to "domain1.com".

    Here are also my domain DNS entries in ISPConfig. All three domains have the same settings.
    Code:
    $ORIGIN  domainX.com.  ; designates the start of this zone file in the namespace.
    $TTL     3600         ; default expiration time of all resource records without their own TTL value (seconds).
    domainX.com.  3600  IN  SOA  ns1.domainX.com.  info.domainX.com. (
                     2019111401  ; serial number of this zone file (date + todays serial).
                     28800       ; frequency to refresh secondary DNS (seconds).
                     900         ; frequency to refresh secondary DNS in case of problem (seconds).
                     604800      ; secondary DNS expiration time (seconds).
                     1800        ; minimum caching time if resolution failed (seconds).
    )
    domainX.com.              3600  IN  A          18X.2X7.10X.8X
    ns1                      3600  IN  A          18X.2X7.10X.8X
    ns2                      3600  IN  A          18X.2X7.10X.8X
    server1                  3600  IN  A          18X.2X7.10X.8X
    www                      3600  IN  A          18X.2X7.10X.8X
    mail                     3600  IN  A          18X.2X7.10X.8X
    ts                       3600  IN  A          18X.2X7.10X.8X
    domainX.com.              3600  IN  AAAA       2a03:4000:1e:398::1
    domainX.com.              3600  IN  AAAA       2a03:4000:1e:398::1
    ns1                      3600  IN  AAAA       2XX3:X0X0:1X:XX8::1
    ns2                      3600  IN  AAAA       2XX3:X0X0:1X:XX8::1
    server1                  3600  IN  AAAA       2XX3:X0X0:1X:XX8::1
    www                      3600  IN  AAAA       2XX3:X0X0:1X:XX8::1
    mail                     3600  IN  AAAA       2XX3:X0X0:1X:XX8::1
    ts                       3600  IN  AAAA       2XX3:X0X0:1X:XX8::1
    domainX.com.              3600  IN  NS         ns1.domainX.com.
    domainX.com.              3600  IN  NS         ns2.domainX.com.
    domainX.com.              3600  IN  TXT        "v=spf1 mx -all"
    _dmarc.domainX.com.       3600  IN  TXT        "v=DMARC1; p=quarantine; fo=1; ruf=mailto:[email protected]"
    domainX.com.              3600  IN  MX   1     mail.domainX.com.
    _ts3._udp.domainX.com.    3600  IN  SRV  1  0  9987 ts.domainX.com.
    _tsdns._tcp.domainX.com.  3600  IN  SRV  1  0  41144 ts.domainX.com.
    
     
    Last edited: Jan 1, 2021
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Is this alias domain with own vhost or not? Is your web server apache2 or nginx?
     
  3. SuperLOL

    SuperLOL Member

  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

  5. SuperLOL

    SuperLOL Member

    I don't see any option in ISPConfig to redirect a vhost (Domain) to another vhost (Domain).
    If I'm not wrong then the Alias-Domains option in ISPConfig should do that if i set that option to Redirect Type (R,L).
     
  6. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    SuperLOL likes this.
  7. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Set redirect type to R,L and redirect path to "https://www.domain1.com/" (or without www ;) )
     
    ahrasis and SuperLOL like this.
  8. SuperLOL

    SuperLOL Member

    Well that's embaresing. I only had to put also the http URL into the Redirect Path option. :eek:
    Thanks guys everything works now even with the Aliasdomain option. :)
     
    Last edited: Jan 1, 2021
    ahrasis likes this.
  9. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Good to hear :)
     

Share This Page