A preferred domain is the version you choose for both users and search engines to consider as the primary version of the website. This can be achieved by writing a piece of code instructing to redirect all the versions of the site to your preferred version at server level.