How to Force Redirect Domains in DirectAdmin

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.

Domain Setup Icon DirectAdmin

Then click on the Domain Setup icon under the Account Manager Category.

Domain Management DirectAdmin

On this Domain management page, click on the domain name. You can now see the Modify Domain page.

Domain Force Redirect DirectAdmin

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.