Plesk for Windows
Plesk for Linux
kb: how-to
ABT: Group A
Applicable to:
- Plesk for Linux
- Plesk for Windows
Question
What are the best practices of "preferred domain" configuration?
Answer
Typically, any website is available on two URLs: with the www prefix (like in
www.example.com)
and without it (like in
example.com
).
In general, we recommend that you always redirect visitors to one of these URLs (typically to the non-www version). For example, after you set the Preferred domain to the non-www version (example.com), site visitors will be redirected to this URL even if they specify www.example.com in their browsers.
Refer to Plesk documentation for more details.
Comments
2 comments
i used plesk xml api to create subscribers and subscription.
recently, an update in plesk changed the default subscription parameter Hosting Settings -> Preferred domain from none to non www domain.
i'm searched in api xmp doc, but just found this
https://docs.plesk.com/en-US/onyx/api-rpc/about-xml-api/reference/managing-subscriptions/subscription-settings/subscription-preferences.33887/
the problem is that is for setting www or no www prefered domain rule, and can't set none this way.
how to set prefered domain to none using xml api subscription ?
ref: https://docs.plesk.com/en-US/onyx/api-rpc/about-xml-api/reference/managing-subscriptions/subscription-settings/subscription-preferences.33887/
Hello @Christian Audebert,
Please, use the following example request to change preferred domain settings to www:
Please sign in to leave a comment.