• 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
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

Question Default to WWW on service plans

Denis Gomes Franco

Regular Pleskian
Hi,

I like to run all my websites (I'm an agency hosting customers' sites) with the WWW prefix. I noticed you can set this as default for a domain (eg. Plesk will redirect from non-WWW to WWW) but seems like this cannot be set as default on a service plan.

So if I change this option on a subscription, Plesk will lock that subscription, preventing me from applying changes to all subscriptions using that plan later on.

Is there any way around this?
 
Another thing is, because of the above, Plesk will only install Wordpress on the domain without WWW. While installing Wordpress from within Plesk, I cannot change the domain to include WWW, unless I set WWW as default for that domain (and thus lock the subscription from changing).

After installing Wordpress I can change it to use WWW, but I would like to know if this could be done on Plesk right away, instead of later on.

Yeah, call me a stickler to details ;)
 
So if I change this option on a subscription, Plesk will lock that subscription, preventing me from applying changes to all subscriptions using that plan later on.
This is not the case. You can freely apply this change in a subscription, yet the subscription is not locked for service plan changes, because that setting is not part of the service plan preset.
 
You could try running a CLI command on a Plesk event, like 'physical hosting created' to set the preference how you want it.

plesk bin site -u example.com -www true

site: Sites
 
This is not the case. You can freely apply this change in a subscription, yet the subscription is not locked for service plan changes, because that setting is not part of the service plan preset.

I beg to differ: Screenshot

But I noticed something else: by unlocking the subscription it will retain the WWW option. So why is the subscription locking in the first place?
 
Nice! Didn't know (yet) about these commands. Can I run these on all domains/subscriptions at once?

To run on all sites, you would need to write a script. Use CLI to get all domains and then loop over them.

For the Plesk event, the domain is available to the command as something like {NEW_DOMAIN_NAME}. Check the docs, as I've probably got that wrong.
 
Back
Top