Virtual server on virtualmin keeps redirecting to wrong website

Because it is one of several kinds of misconfiguration. There is no one fix for it, and we haven’t yet figured out how to prevent every kind of misconfiguration.

The “Wrong Site Shows Up” section of our troubleshooting guide covers some of the ways it can be misconfigured:

A more recent twist on that now that IPv6 has become more common is that people leave IPv6 enabled in Virtualmin and configured on the system, but don’t get the configuration right…so you end up with misconfigured VirtualHosts in Apache.

I have not changed anything on webmin and virtualmin yet.
Server just has a fresh webmin and virtualmin installation. After that i created “New virtual Server” and the issue show up.


The most common cause I’ve seen associated with your description is, “SSL” isn’t turned on for the domain in question, so you are getting the “primary” domain for the IP address.


I have the latest Virtualmin installed on Ubuntu 22.04 and it doesn’t do that by default.

When you created the new virtual server, you’ll have the option to turn that on here:

You might want to go to that new virtual server, select Edit Virtual Server and make sure that box is checked.

@levantoi213 @Gomez_Adams,

Based on @Gomez_Adams screenshot, you can adjust this defaults from the System Settings > Features and Plugins page.

The first column makes the feature available, the last column makes it “checked” by default.

No checkbox on latest version. It’s seem enabled by default.

1 Like

it’s seem enabled by default for all domains. But still faced this issued

1 Like

well I see something different on the latest version

Have you edited the account plan ?
you may want try selecting the options rather than accepting the defaults
vmin->system settings->account plans
and just try some custom settings on the plan, check everything you want on the plan making sure that AT LEAST the two arrowed options are set but looking at your screen shot you can work out which options to set

I am unsure why you don’t have ssl web sites set as an automatic option, unless you are already using custom options & didn’t tick ssl web site

Deleted - misunderstood post.

That’s odd. Even if it’s automatic, I would think it should be in that listing as active with a check mark next to it. It not being there at all is really weird.

may it’s not in the automatic settings for some reason ? It’s a long time since I installed vmin so I can not remember if there there is a question about this in the post install process

There isn’t.

Counts that out then

1 Like


If the checkbox doesn’t appear in list, then it’s disabled on “System Settings > Features and Plugins”.

1 Like

No, i can see it enabled

It seem using default config with automatically.

Hi all,
I can see that all of my domains have SSL config by default when created but not sure why all will be redirect to main domain on the server.
Still finding out

As I mentioned in my first response, there are many potential causes. Apache’s virtual host selection algorithm can be confusing. Another common problem is IPv6 misconfiguration, but it’s not the only possibility.

Once again, check the troubleshooting guide, as it covers several of the causes of this behavior (though not all, it just covers the gist of the problem, which is that Apache disagrees with you about what the “best match” for a give URL is): Website Troubleshooting – Virtualmin

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.