Separate website or redirect
Separate website
Create a separate site when the subdomain needs its own files or application. Set its document root and upload content there.
Same content
If it should serve the main site's files, newer DirectAdmin versions can use the same document root. Consider canonical URLs, cookies, application configuration and search indexing.
Redirect
If visitors should land on another URL, use a redirect instead of copying the website. A permanent 301 suits a stable move; a temporary 302 suits a short-lived state.
- Make sure the source subdomain has working DNS and HTTPS.
- Configure the redirect in DirectAdmin or in one web configuration layer.
- Decide whether paths such as
/productmust be preserved. - Test HTTP, HTTPS and several URLs.
Avoid loops
Do not redirect two addresses to each other. Duplicate rules in DirectAdmin, the application and .htaccess can cause Too many redirects.