Best practice for .com / .net / .org Joomla! sites & redirection — CyberPanel - WebHosting Control Panel for OpenLiteSpeed

Best practice for .com / .net / .org Joomla! sites & redirection

Say we have a J3.x site on We also have and domains.
We want to redirect all to

DNS on registrar

What I did:
* Created private nameservers for on registrar.
* Pointed to
* Created the website on CP
* Created nameservers on CP
* Created Alias domains and under on CP
* Created the following htaccess at the root of (/home/

RewriteCond %{HTTPS} off [OR]
RewriteCond %{REQUEST_URI} !^/cms/ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\. [NC,OR]
RewriteCond %{HTTP_HOST} ^$ [NC,OR]
RewriteCond %{HTTP_HOST} ^$ [NC]
RewriteRule ^/? [R=301,L]

Anything wrong with the above steps?

I'm not sure how I can handle DNS records for and thou...


  • You can't redirect different top level domains .com .net .org etc within the same .htaccess file.
    If your main site is .com concentrate on getting that working properly, then either create seperate sites with redirects for the other domains or just forward them at the registrar.
  • Actually I was doing it on cPanel / Apache for ages. But I think my problem is with the DNS handling in CyberPanel, I couldn't understand it after a week of usage.

    In any case, you are right, it will be more logical to forward them at the registrar.

    Thank you :)
  • edited July 2020
    The DNS settings (powerdns) are very similar to the bind settings in Cpanel, if you wish to use private nameservers (ns1, like you suggest, remember that you need to register glue at your registrar and in your DNS settings.
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!