Question

I can't setup a wildcard subdomain for WordPress Multisite

Posted November 23, 2017 1.7k views
UbuntuApacheWordPressDNS

I have created a WP multisite for an existing site in order to create a shop subdomain. I have create a wildcard CNAME (Pic: https://i.gyazo.com/82097d51ca5964dded4c58704e794c7c.png), and I have added the line:
ServerAlias *.strongest.co.il
to the files:
/etc/apache2/apache2.conf ;
/etc/apache2/sites-enabled/000-default.conf ;
/etc/apache2/sites-available/000-default.conf ;
The line is inside <VirtualHost *:80> </VirtualHost>, and my subdomain just doesn’t work, I have already added this site using my WordPress panel to the multisite network and the page doesn’t load; I get the following message:
This site can’t be reached

shop.strongest.co.il’s server DNS address could not be found.

I have tried to run ping shop.strongest.co.il using the command prompt and it give me the following message:
Ping request could not find host store.strongest.co.il. Please check the name and try again.

What can I do?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hello,

This looks all correct. Note that it can take up to 24-48 hours for the DNS cache to clear over the Globe before you could actually see your DNS changes.

Also as a side note, keep in mind that a wildcard (*) will direct requests for a non-existent subdomain to a server or load balancer. However, if any kind of DNS record exists for a hostname, the wildcard will not apply; you will need to explicitly create an A record for it.

Regards,
Bobby

Submit an Answer