• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Domainalias ignores www-redirect from maindomain

Naderio

New Pleskian
Hello,

I have the domain (www.unixtimestamp.eu) and 7 aliases configured.

In the main-domain i have set the preffered domain with www-redirect. This works without any problems.
The problem is, that all of the aliases ignores this setting and i'm not able to change this per domain.

As example, opening the alias www.unix-timestamp.eu works.
opening unix-timestamp.eu should redirect - but didn't.

Is that a bug of Plesk or is there any way to force this redirection in Plesk Onyx?

Thanks

Naderio / Thomas
 
Hi Naderio,

did you see the official Plesk documentation at


... and could you pls. tell us YOUR settings for "Redirect with the HTTP 301 code", for the alias domains?


In addition, it could help to attach the depending webserver configuration files from

=> /var/www/vhosts/system/(subdomain)YOUR-DOMAIN.COM/conf

... for further investigations. ;)
 
Hi UFHH01

The "Redirect with 301" is switched off for the alias domains.

I've made an archive with the conf-folder. Is it save to post this files to this forum or should i send you a private message with a link?
 
Hi Naderio,

Is it save to post this files to this forum or should i send you a private message with a link?
It is certainly save, as unregistered users don't have access to attachments and what is far more important, there are no sensitive informations - IPs and domain names are public informations and you shouldn't worry at all about it. ;)


If the redirect is switched off, could you tell us how do you expect the redirect from www to non-www, or the other way round ?
Pls. consider to switch the option and you might be surprised about the "magic". :D ( Compare as well the different configuration files after the change, to understand the setting a bit better ).
 
Pls. consider to switch the option and you might be surprised about the "magic". :D

The magic didn't happen :)
When I switch the redirect to ON, the alias-domain will redirect to the main domain.

I want the aliasdomain to be redirected to www.alias.tld

The configfiles are attached.
 

Attachments

  • unixtimestamp_configfiles.zip
    8.2 KB · Views: 2
Hi Naderio,

ah... so you don't care about the loss of google rankings for your MAIN - domain for example and desire only the redirect from non-www to www.

For alias domains you will then use an additional nginx - rewrite, as for example:
Code:
    if ($host ~* ^YOUR-DOMAIN\.COM$) {
        rewrite ^(.*)$ https://www.YOUR-DOMAIN.COM$1 permanent;
    }
... where you specify each domain separately, which should be redirected to it's the desired - URL.

... because you only have the following defined for your MAIN - domain:
Code:
    if ($host ~* ^unixtimestamp\.eu$) {
        rewrite ^(.*)$ https://www.unixtimestamp.eu$1 permanent;
    }



Your initial question can now be answered:
As example, opening the alias www.unix-timestamp.eu works.
opening unix-timestamp.eu should redirect - but didn't.

Is that a bug of Plesk or is there any way to force this redirection in Plesk Onyx?
For alias domains there is only the option to redirect to the main domain, to avoid redirect - loops and what is far more important, to avoid misconfigurations, which may lead to 404 - errors for your alias domains ( depending on your website - coding or used content! ). :)
 
Back
Top