1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

Resolved Redirect Alias Domain to https

Discussion in 'Plesk Onyx for Linux' started by Heppi75, May 29, 2017.

  1. Heppi75

    Heppi75 New Pleskian

    5
    70%
    Joined:
    Mar 9, 2016
    Messages:
    16
    Likes Received:
    2
    Hi,

    if I make an alias domain for an https domain - the first redirect is done to the https of the alias? It should be a direct redirect to the main Domain?

    Example - my primary domain ist www.mydomain.com

    Alias:
    www.myalias.com is redirected first to https://www.myalias.com instead of directly to https://www.mydomain.com

    I made it now with a own rule in the htaccess - but could this not be done in plesk directly - now I have 2 301 redirects before I land on the correct domain?

     
  2. Peter Debik

    Peter Debik Golden Pleskian Plesk Guru

    34
    80%
    Joined:
    Oct 15, 2015
    Messages:
    1,765
    Likes Received:
    344
    Location:
    Berlin, Germany
    A domain alias should no redirect at all, but transparently load the domain content under the alias domain name. If an alias is redirecting, the redirect is coming from a rule outside of the web server, e.g. in .htaccess or in a script loading from the website.

    You probably mean a redirect? In that case of a redirect you can enter the https:// destination directly, so that only a single redirect should take place.
     
  3. Heppi75

    Heppi75 New Pleskian

    5
    70%
    Joined:
    Mar 9, 2016
    Messages:
    16
    Likes Received:
    2
    Hi Peter,

    thank you for your quick reply.

    I have one primary domain which is config as seen in the file primary attached. there you can see that I use a redirect to the SSL ...

    On the other side I have an alias domain for this SSL domain - that config is as seen in alias attached.

    If I use this config the alias is redirected first to the SSL version of the alias - which not existes - because I have no certificate for it. I wish that the alias is redirected to the SSL version of the primary - that I could not manage in plesk. I could only choose the domain to which it should be redirected - but it is redirected to the SSL of the alias?

    Hope you understand what I mean?
     

    Attached Files:

  4. Peter Debik

    Peter Debik Golden Pleskian Plesk Guru

    34
    80%
    Joined:
    Oct 15, 2015
    Messages:
    1,765
    Likes Received:
    344
    Location:
    Berlin, Germany
    Best Answer
    With the latest version of the Let's Encrypt SSL extension in Plesk Onyx it is possible to create SSL certificates for each alias.

    If you want an alias to redirect to a different domain name and different protocol, the correct solution is to remove the alias and create the domain as a separate domain entry, then redirect that domain to the https:// destination.

    Creating an SSL certificate for redirections does not make sense, because no content needs to be encrypted. Further, speed optimization for redirection domains does not make sense either, because it's simply not counted by Google ranking algorithm. You're hunting a ghost. Better take a nap in the sunshine and enjoy a cold drink. All these redirect speed optimization things like pingdom speed test claims it ought to be done is nonsense.
     
    Last edited: May 30, 2017
  5. mow

    mow New Pleskian

    2
    70%
    Joined:
    Mar 23, 2017
    Messages:
    11
    Likes Received:
    0
    Location:
    Germany
    However it avoids browser warnings and redirect blockage should the domain ever be accessed through https. (This could happen if the browser by itself or by HTTPS Anywhere plugin decides to go to the "secure" site.)
     
  6. Nadir Latif

    Nadir Latif New Pleskian

    2
    20%
    Joined:
    Apr 21, 2017
    Messages:
    2
    Likes Received:
    0
    Location:
    Karachi, Pakistan
    We had a similar problem. We wanted to create a domain alias without 301 redirection. Our primary domain has https. The alias should just show the contents of the primary domain is browser, without redirecting to https.

    We had some code in the Apache And Nginx Settings page of the domain which was causing redirection for all domain aliases from http to https. After we removed this code, the domain alias started working correctly without redirecting to https.

    The redirection code for redirecting from http to https should be specific to the primary domain
     
Loading...