I have Wordpress 3.4.2 set up on a Windows 2008 R2 server with IIS 7.5. I enabled multisite using subdomains and set up one additional site, call it child.example.com. I can browse to the main site at example.com just fine, but whenever I browse to child.example.com it tries to go to the default web site in IIS, which has ID 1 and currently points to an empty directory. The main Wordpress site is one that was manually added to IIS, and its ID is 3. I created entries in my hosts file on the server for the main site and the child site, and they seem correct (I don't have access to our DNS provider at the moment).

In trying to figure this out, I keep coming back to these entries for wp-config.php:

define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

These seem to tell Wordpress the ID of the site where it will live. My question is what does that number represent? Does it have any correlation to site IDs in IIS? If I change it from 1 to 3, would that tell Wordpress to use the proper site when accessing its subdomains?

It seems that those numbers might refer to the values in the site_id and blog_id fields in the wp_blogs table, specifically for the record associated with the main site. I tried changing them to 3 in wp-config and bouncing IIS, but that had no effect.

So now my question becomes, how can I get Wordpress to look to its own IIS site when a request comes in for a sub-site, versus looking at the site designated as the 'default' in IIS?

  • How did you add the binding for the subdomain in IIS? I want users to be able to create their own subdomains without having to manually set one up every time, is this possible with IIS? If not, what type of hosting would I need to achieve this? Apr 22, 2014 at 18:10

1 Answer 1


I finally figure it out. I was missing a binding on my main Wordpress site in IIS. I needed to add one for the sub-site, in this case child.example.com, specifying the same IP. After doing that I could successfully browse to the sub-site. Presumably when IIS can't find any matching binding for the given host name, it just reverts to the default site.

  • I've confirmed adding the subdomain binding to the IIS 7 site was the missing step. Works in my Windows 2008 R2 environment. Thanks for sharing!
    – user49634
    Mar 28, 2014 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.