ServerName wildcards in Apache name-based virtual hosts?

Use ServerAlias, rather than ServerName alone:

ServerName somename.dev

ServerAlias *.dev


If this can help, just to complete a bit Mo's answer:

Wildcards in ServerAlias also works on partial domain names, such as

ServerName somename.dev

ServerAlias *-mysite.dev

It saved my life recently ^^ (a main site with subdomains for each sub app such as admin-somename.dev, bo-somename.dev, api-somename.dev...)