KNOWNHOST WIKI

User Tools

Site Tools


control-panels:directadmin:how-to-manage-url-redirects-in-directadmin

How To Manage URL Redirects in Direct Admin

There are times when you'll want to point visitors from one URL to another quickly and easily within DirectAdmin.


How to Redirect One URL to Another in DirectAdmin

  1. Login to DirectAdmin
  2. Pick the appropriate account / domain from the top dropdown
  3. Click Account Manager, Site Redirection
  4. Click CREATE NEW REDIRECT
  5. Add the Local URL Path for the page (or content) you want redirected
  6. Set Redirect Type to 301 for permanent or 302 for temporary
  7. Add the Destination URL where you're redirecting to
  8. Click CREATE


Special Cases

Redirecting a single URL is one thing, but redirection can also include redirecting all URLs from HTTP to HTTPS or https://yourdomain.com to https://www.yourdomain.com.


How to Redirect HTTP to HTTPS in DirectAdmin

  1. Login to DirectAdmin
  2. Pick the appropriate account / domain from the top dropdown
  3. Click Account Management, SSL Certificates
  4. Tick the box Force SSL with https redirect at the bottom
  5. Click Save

Notes:

  • You'll need an SSL certificate installed before starting this process.
  • You'll want to 1)update Google Search Console using these steps as well as Google Analytics and your tracking code within your website/CMS.
  • Updating your content links within the site to point directly to the HTTPS URLs would be good.


Redirecting Non-WWW to WWW in DirectAdmin

Unfortunately there's no direct way of creating a non-www to www redirect from within the DirectAdmin GUI.

The traditional approach is to 2)edit the .htaccess file as mentioned in our wiki page about such. It will be found in the public_html folder of the site.

It can be edited using File Manager or edited locally and uploaded via FTP

control-panels/directadmin/how-to-manage-url-redirects-in-directadmin.txt · Last modified: 2020/08/18 08:03 by Karson N.