Wildcard Subdomains with Apache

To add a wildcard domain (i.e. *.subdomain.mydomain.domain) all you really need to do is set up a new vhost in the Apache config and use the matching ServerName and ServerAlias:

ServerName subdomain.mydomain.domain
ServerAlias *.subdomain.mydomain.domain

That’s it, you can easily utilize and parse all subdomains below subdomain.mydomain.domain now.

Published by


The fool's herald.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.