How to Easily Redirect Non-www to www URLs: A Step-by-Step Guide
If visitors can reach your site with or without www, choose one hostname and configure a permanent redirect from the other. This guide explains the setup and how to test it. Check that old links keep their page paths and reach the preferred hostname directly.