wildcard dns and WordPress multisite.

rsbenedict

Verified User
Joined
Sep 27, 2008
Messages
36
I've set up wildcard dns on DA for my wordpress multisite install but it causes a problem.

My domain is hostingdifferent.com and I have other subdomains like help.hostingdifferent.com, status.hostingdifferent.com, billing.hostingdifferent.com, etc. When I set up the wildcard DNS, none of these links work.

I noticed in the custom httpd the wildcard comes first. When I try to rearrange it in the list, DA keeps putting back on top and this is causing none of the other domains to resolve.

Any idea how to fix this?

Thanks!

Scott
 

Themis

Verified User
Joined
Oct 1, 2010
Messages
172
Location
London, UK
Go to "User Panel" -> DNS Management -> and add an A record:

* A xxx.xx.xx.xxx (Replace "xxx.xx.xx.xxx" with your IP.)

Go to "Admin Panel" -> Custom Httpd -> yourdomain.com -> In the text area enter the following:

ServerAlias *.|DOMAIN|

Restart Apache.


That should do it.
 
Last edited:

rsbenedict

Verified User
Joined
Sep 27, 2008
Messages
36
Done that, but then it ignores all previously-created subdomains. The only way we can get it to work is if the subdomian virutalhosts appear FIRST in the list and the wild card entry (that you gave) shows last, so it checks if it's subdomain.domain.com, then subdomain2.domain.com, then subdomain3.domain.com before it gets to wildcard entry. The problem is that DA rewrites the order and puts wildcard at the top which breaks everything.
 

Themis

Verified User
Joined
Oct 1, 2010
Messages
172
Location
London, UK
Keep only the ServerAlias *.|DOMAIN| in the text field.
This way all other subdomains that you create will work.

I've done this for more than 30 Wordpress multisites and it worked every single time.
 

rsbenedict

Verified User
Joined
Sep 27, 2008
Messages
36
Just tried what you said again and exactly what has always happened continues to happen.

BEFORE WPMU, I created subdomains, billing.domain.com, wp.domain.com, etc and when I create the wildcard the wpmu part works fine, but any of the subdomains I previously created resolve to the main domain only and not to the subdomain content.
 

Themis

Verified User
Joined
Oct 1, 2010
Messages
172
Location
London, UK
Just tried what you said again and exactly what has always happened continues to happen.
Be sure that you have added the A Record with your IP:
Code:
* A xxx.xxx.xxx.xxx
...modified the "wp-config.php" and added:
Code:
define ('WP_ALLOW_MULTISITE', true);
 

rsbenedict

Verified User
Joined
Sep 27, 2008
Messages
36
All of that has been done. When I create new users with multisite, it works. But what I'm trying to say is that the subdomains that I created BEFORE multisite and outside of wordpress will not work. The only way they will work is if they come up BEFORE the wildcard entry in the virtual host.

I created these subdomains in DirectAdmin NOT in wordpress. They will not work. I've followed all instructions for multisite and for wildcard domain, but as I've said, my premade subdomains don't work. Only ones created in wordpress and these subdomains do not resolve to any wordpress installation. They resolve to other pages or websites.
 

Themis

Verified User
Joined
Oct 1, 2010
Messages
172
Location
London, UK
Yes, any premade subdomains don't work. Only the ones created in wordpress.
You should only create the subdomains after you have enabled the Multisite feature. Wordpress handles all the subdomains you create and not DA.
 

pppplus

Verified User
Joined
Dec 19, 2008
Messages
518
Hi

I reply to this old post, because I've a problem with a WP multi-domain on subdomain.

1st : I've some subdomains (with wordpress), which must stay
2nd : I've installed WP in multisite.

Now, I want to have it in Multi Site for new subdomain.

What are exactly the steps ?

Thanks for your help.
 
Top