Strange alias behaviour

Hi everyone

I have been using Virtualmin GPL with great success for around 6 months or so now and I love the flexibility of the system.

I have a minor issue at the minute with domain aliases, I’ll explain the dilemma below.

My configuration is this.

  1. is a ‘Top-Level Server’ where the contents of the main website is stored and served from.
  2., and are all ‘Alias Servers’ of
  3. is a ‘Top Level Server’ which is configured to receive mail for all of the domains above via a mail alias of all being directed to the mail user in, but has a web redirect of the root ‘/’ to

The intention of this setup was to catch old traffic visiting the oldurl addresses and to catch anyone using the short mail url in a browser and redirect them to the new main site at My client also wanted a shorter url for emails, hence the domain name web redirect.

This works almost as I intended it, however I have an issue where anyone navigating to via search results are being showed the new content but at the old domain. Is this how it is intended to work or is something not configured correctly?

If it is intended to work this way, how should I change it to behave the way I want it to - ie to redirect to

I hope this is explained in enough detail, but let me know if you need any more info.

Cheers in advance.


Yup, that’s working as intended, but you can indeed change that.

If you to into System Settings -> Server Templates -> Default -> Apache Website, you can change “Create alias websites by”.

Now, that will only change new Virtual Servers – so you’d need to delete and then re-add any Alias servers where you want to see that behavior.


Cheers Eric - which of the options is the one that I want?

I’d guess at it being the ‘Creating permanent Redirect virtual host’, but does that option deal with specific pages and subfolders etc?

Yup, with that option – any request to the alias domain should be redirected to the same folder in the top-level domain.


Thanks Eric, I’ll give that a shot this am.

Yep, that’s done exactly what I wanted. Cheers again Eric.