Question regarding Wildcard Subdomains and WordPress


Verified User
Aug 30, 2005
Bellingham, WA
I am attempting to get Wildcard Subdomains working with a WordPress site that has had the multi-site option enabled but seem to be missing something, the instructions I have been following are here...

The site I have set up is for testing purposes only, I added a user to DirectAdmin creating a site similar to I then installed WordPress in the main public_html folder there with the multi-site option enabled.

Next I created an A record for the site containing just an * and the ip address of the site, that part is working fine, I can perform an nslookup on, or and the correct IP address is returned.

I then added the line "ServerAlias *.||" to the Apache configuration and that is where I seem to be getting stuck. With that entry in place I went ahead and created a new site in WordPress named "" but when visiting that site I always end up at the Apache is functioning normally page instead of the proper site.

However, if I add the line "ServerAlias" directly instead of "ServerAlias *.||" that works perfectly. If necessary I guess I can just add every site I want to set up in WordPress separately but it would be easier if I could get the wildcard working.

Can any one provide any insight as to why adding "ServerAlias *.||" to the Apache config might not be working when adding the sites directly (without the wildcard) does?

Thanks in advance.


Super Moderator
Apr 11, 2005
GMT +7.00

Is it the exact code that you add:

[COLOR=#333333]ServerAlias *.||

that should be this way (if you use [/COLOR] but not tokens):

[COLOR=#333333]ServerAlias *


Verified User
Apr 28, 2020
I am trying to do the very same on a WP multisite

My setup is WP Multi-Network where the site in question is a root domain for sub-multisite on the multi-network, and the domain is set up in domain pointer using Cloudflare DNS.

No problem doing this in cPanel, is this limitation in DA or just plain error pointing to some kind of failure?

ServerAlias *

I hit save and I get this error:

Unable to write customization
AH00526: Syntax error on line 676 of /usr/local/directadmin/data/users/admin/httpd.conf:
ServerAlias only used in <VirtualHost>

Anyone know how to solve this issue?

Turn your multi-site installation of WordPress into many multi-site networks, all surrounding one central user base.