Roundcube opens at domain.com/roundcube instead of webmail.domain.com on Virtualmin

SYSTEM INFORMATION
OS type and version Ubuntu Linux 24.04.3
Virtualmin version 7.50.2 GPL

Hi everyone,

I recently installed Virtualmin and noticed that when I try to access Roundcube, it opens at domain.com/roundcube instead of the usual webmail.domain.com.

I expected it to be accessible via the subdomain webmail.domain.com for all domains. Right now, the Roundcube URL is hardcoded to the folder /roundcube under the main domain.

I’m not sure if this is a Virtualmin configuration issue, a DNS/subdomain setup problem, or something else.

Can someone guide me on how to make Roundcube accessible via webmail.domain.com as the default link instead of domain.com/roundcube?

Thank you in advance!

Edit the redirect to go to roundcube

RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.yourdomain.com
RewriteRule ^(?!/.well-known)(.*) https://yourdomain.com/roundcube/ [R]

small follow up, where would you put this redirect? Apache or .htaccess

Edit the current webmail directive
I’ve never tried using .htaccess, it should override apache.

1 Like