Can't get aliases to work

The main domain works fine. I have created an alias but it gives me a 403 error when I try to go on it. Any ideas?


Hmm, is there any chance you could share the two domain names in question?

I’m curious if there’s a DNS error of some sort that’s causing the problem you’re seeing.

The only other thing you might check, is to look in $HOME/logs/access_log to make sure you see an entry there when accessing the alias domain.


Hi Eric

Thanks for your reply. The domains are and the alias

Not sure what is causing the issue but I have added these rewrite rules in httpd.conf and it seems to have gotten around the issue.

RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.)$$1 [L,R=301]
RewriteCond %{HTTP_HOST}
RewriteRule ^(.
)$1 [R]



Hmm, as I access both of the domains you mentioned above, it takes me to the same website.

I’m not seeing any errors with either domain.

Are you still seeing an error when accessing the alias? If so, I’m wondering if you’re experiencing a DNS caching issue.


Hi Eric

It was not working using the alias tutorial when I posted the question.

But, then I added the following code to httpd.conf and it seems to have corrected it:

RewriteCond %{HTTP_HOST} ^ [NC] RewriteRule ^(.)$$1 [L,R=301] RewriteCond %{HTTP_HOST} RewriteRule ^(.)$1 [R]

However, not sure this is the recommended way of doing things.

Nuts, my apologies, I missed the rest of your update when I responded. You did indeed say all that.

I was so excited when I saw the two domain names that I raced off and started testing :slight_smile:

I’m not quite sure why it wasn’t working at the moment… however, there’s nothing wrong with adding those rules to your httpd.conf file.

Those will also be included with any Virtualmin backups you make, as it makes a backup of the Apache config for your domain.

You should be good to go!