• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved how to configure my subdomains so that they do not use www?

Danny Fransen

New Pleskian
Hello,

i am new to the forum and plesk and need some help on how to configure my subdomains so that they do not use www. The issue is i have a wild card certificate, which does not support www.<subdomain>.<domain>.com and whenever i go to <subdomain>.<domain>.com it is automatically adding the www. So what i would like to have is that my primary domain can use www. but not my subdomains.

There is no possibility to set the "Preferred domain" on sub domain level and changing the primary domain to "<domain>.com" results in too many redirects when i try to access my site, but "<domain>.com" without www is not what i want anyway.

Any help will be really appreciated
 
You really ought to find out what is causing the redirect from <subdomain>.<domain>.com to www.<subdomain>.<domain>.com. This is not standard Plesk behavior and is likely configured trough your website.

Unless you've added your <subdomain>.<domain>.com as an actual domain in Plesk in stead of a sub domain.
 
Go to "Hosting Settings" of your main domain. Set Prefered domain to: none. That way Plesks doesn't do any redirects. Not for your main domain, nor for the subdomain.
If you go to www.maindomain.com , (as far as Plesk is concerned) you will get that. And if you go to maindomain.com you will get that as well.

Should you still have an active redirect - either www to non-www, or the other way round - see if there is an .htaccess based redirect for example. Or if it's a site based on a CMS if there is a plugin that's doing that.

Once you have no redirects at all working anymore, start with how you like it. Don't do it in Plesk as it can't do what you want. Use .htaccess (or nginx commands) to have your main domain redirect to www.maindomain,com , and leave the subdomain alone.

That should do it.
 
You really ought to find out what is causing the redirect from <subdomain>.<domain>.com to www.<subdomain>.<domain>.com. This is not standard Plesk behavior and is likely configured trough your website.

Unless you've added your <subdomain>.<domain>.com as an actual domain in Plesk in stead of a sub domain.
Thank you for pointing me in the right direction, issue is resolved now!
 
Go to "Hosting Settings" of your main domain. Set Prefered domain to: none. That way Plesks doesn't do any redirects. Not for your main domain, nor for the subdomain.
If you go to www.maindomain.com , (as far as Plesk is concerned) you will get that. And if you go to maindomain.com you will get that as well.

Should you still have an active redirect - either www to non-www, or the other way round - see if there is an .htaccess based redirect for example. Or if it's a site based on a CMS if there is a plugin that's doing that.

Once you have no redirects at all working anymore, start with how you like it. Don't do it in Plesk as it can't do what you want. Use .htaccess (or nginx commands) to have your main domain redirect to www.maindomain,com , and leave the subdomain alone.

That should do it.
Thank you for the step by step approach, was really helpful. There was a redirect in the .htaccess file that i removed.
 
Back
Top