Regardless of the domain's URL that visitors specify in a browser (with the www prefix or without it), a page with the preferred domain's URL opens.
The HTTP 301 code is used for such a redirection.
The recommended value is a domain name without www, which means SEO-safe redirections from www.domain.tld to domain.tld.
If your website uses online forms for submitting data, make sure that these forms refer to the preferred domain.
1) To do this, login to your Plesk Control Panel
2) Under "Subscriptions", go to "Manage Hosting" for the domain you want to update.
3) On the "Websites & Domains" tab, you'll find a "Hosting Settings" link/option next to the domain name.
4) on the "Hosting Settings", choose the Preferred Domain from the drop down list option.
5) Click the "OK" button at the bottom of the form to update the settings.