Sometimes, you need to make sure your website needs to use www or without www.
Traditionally, one of the easiest ways was to write a redirection code in the .htaccess files.
But in this quick guide, I will show you how to redirect your website with www or non-www version, step by step.
You need to login to your DirectAdmin.
Then click on the Domain Setup icon under the Account Manager Category.
On this Domain management page, click on the domain name. You can now see the Modify Domain page.
On this page, choose your preferred settings from the Force redirect dropdown menu.
Then click on the Modify button.
That’s it; your website will now either www or a non-www version without writing redirection codes anywhere.
Once you made this change, make sure that you have removed the hard-coded redirection if you may have.