Redirect to


Aside from adding a .htaccess file to force redirection, is there any Virtualmin feature allowing for “” to auto redirect to “”?



If you’d like to do a redirect like that, the best way would be through using a .htaccess file.



Was sort of hoping some feature was available through Virtualmin as doing the .htaccess method could become super time consuming as I need to redirect a few hundred domains in this manner.

The reason for this change is I’m going to be making use of “CloudFlare” as a “hosting provider” where traffic is filtered for “subdomains” and unfortunately not domains directly.

This is because CloudFlare makes use of my own DNS servers where “subdomains” are setup as CNAME’s to their backend, and routed accordingly.



I found a viable solution which seems to work, but will still require some time to implement.

Basically, I’m going to add a global Rewrite Rule to the Apache configuration file for each domain.

This rule will cause all “” variations to automatically do a “301” redirect to “” versions.

Based on the simple concept, all “” will also redirect to “” versions too.

I am also adding this ruleset to Virtualmin’s template so that when new domains are created, the rule it automatically implemented.