How to Redirect Your Website in DirectAdmin
A redirect automatically sends visitors from one web address to another. Common uses include redirecting your old domain to a new one, sending www traffic to your non-www domain, or redirecting an old page URL to a new one after a site redesign.
Redirect Types
301 — Permanent redirect
Use this when a page or domain has permanently moved. Search engines transfer the SEO value of the old URL to the new one. This is the correct choice for most redirects.
302 — Temporary redirect
Use this only if the redirect is temporary and you plan to restore the original URL later. Search engines do not transfer SEO value with a 302.
How to Set Up a Redirect in DirectAdmin
Step 1 — Log into DirectAdmin via my.hostking.host → your service → Login to DirectAdmin.
Step 2 — Under Domain Settings, click Domain Redirects.
Step 3 — Click Add Redirect.
Step 4 — In the Source field, enter the URL you want to redirect from. Examples:
- To redirect your entire domain enter:
yourdomain.com - To redirect a specific page enter:
yourdomain.com/old-page - To redirect a subdomain enter:
shop.yourdomain.com
Step 5 — In the Destination field, enter the full URL you want visitors to be sent to. Always include https://. Example: https://www.yournewdomain.com
Step 6 — Select 301 Permanent or 302 Temporary.
Step 7 — Click Save.
Test by visiting the source URL in your browser — it should automatically redirect to the destination.
How to Redirect HTTP to HTTPS (After Installing SSL)
If you've just installed an SSL certificate and want to force all visitors to use the secure HTTPS version of your site, the easiest method is via your .htaccess file rather than the Domain Redirects tool.
Step 1 — In DirectAdmin, open File Manager and navigate to your public_html folder.
Step 2 — Enable Show Hidden Files if you can't see .htaccess.
Step 3 — Click Edit on .htaccess and add the following lines at the very top:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Step 4 — Click Save and test your site.
Common Problems
"Too many redirects" error
You have a redirect loop — the source and destination are pointing at each other. Check your .htaccess and Domain Redirects for conflicting rules.
Redirect not working after saving
Clear your browser cache — browsers cache redirects aggressively. Try the URL in an incognito window to test accurately.
Old redirect still showing
Delete the old redirect entry in Domain Redirects before creating the new one.
Need Help?
Our support team is available every day from 7am to 10pm via live chat at hostking.host or by opening a ticket at my.hostking.host.
