Wildcard Domains Using VirtualMin/WebMin?


I wanted to know if whether it’s possible to configure VirtualMin to handle all incoming domain name requests even if a record for that domain doesn’t exist on the server? Basically I want a
wildcard domain set up so that I only need to have the domain at the registrar point to my nameserver.


Yup, you can indeed do that!

What you’d want to do is create a new Virtual Server like “example.com”.

Then, go into Server Configuration -> Website Options, and there, set “Website matches all sub-domains” to “Yes”.



Thanks for your answer but I am afraid that isn’t what I am trying to do.

Here’s the scenario. I am only going to use one domain which is going to have a website. All other domains I want redirected to this main domain. There are going to be over 20,000 domains.

So let’s say I have example.com that’s added in VirtualMin. I am going to set every domain’s DNS to point to ns1.example.com and ns2.example.com

So let’s say I have foo.com, joe.com’s DNS pointing to ns1.example.com and ns2.example.com

I would like VirtualMin to automatically handle these domains and redirect them to www.example.com

Is this doable?


Well, if you have the DNS for those domains all pointed to the primary IP of your server – Apache will deliver the default website, if the domain doesn’t have it’s own website.

However, I’m not sure how to do what you’re describing without first setting up DNS for each of those domains.

Maybe there’s an interesting way to make that work that I’m not aware of… but to my knowledge, you’ll still need to configure your DNS server with each of those domains, and make sure that it returns the correct IP address when a lookup is performed.