Support » Networking WordPress » Multisite (Subdomain) Not Finding New Sites

  • I am troubleshooting an unexpected issue in that I appeared to have multisite (subdomain) working just a couple weeks ago.

    Originally I had multisite (subdomain) working with version 3.1 with several plugins, but then somewhere in the course of development, I lost the ability to add new sites. I tried going back several iterations of backups and turning off plugins but could not get it to function again.

    This morning I started with a fresh install using 3.1.3, configured it for multisite (subdomain), added my premium theme and removed twentyten, with no plugins activated, but ended up getting the same results: I can step through creating a new site, but links to the new site (‘visit’, ‘dashboard’, etc) get redirected to a registration page. I noted these links were for domain.com, not the new sub.domain.com.

    In researching, I came across this post: http://wordpress.org/support/topic/second-site-is-blank-but-wp-admin-works?replies=13, and so I reinstalled twentyten, after which the links included the subdomain in the url (sub.domain.com), but clicking on them still resulted in getting redirected to the registration page for the original site (domain.com). Perhaps there is a clue in that twentyten is more multisite aware than my premium theme…

    I have double and triple checked, my wp-config.php, httpd.conf and .htaccess, and have verified that I have an A record for *.domain.com setup in CPanel. I tried disabling (renaming) .htaccess to verify it was working, and when I did, all the permalinks started throwing errors. So, it appears to be working. I also verified that new tables were being created in phpMyAdmin. There were 9 new tables and wp_blogs showed the original, domain.com, as well as the new sub.domain.com.

    The fact that I still have the issue after performing a fresh install makes me think I should be focused on my virtual dedicated server (godaddy), but I am open to suggestions.

    Thanks in advance.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Subdomains work on the premise of the wildcard subdomain being setup in your dns and in Apache.

    So yes. It’s your host.

    Thread Starter shawn m

    (@s_mauldin)

    Thanks for the quick reply Andrea.

    I have wildcard subdomains (*.domain.com pointing to my dedicated IP) configured in both the dns (with godaddy) and in Apache (via WHM/cPanel). When I enter a random subdomain (anything.domain.com) wordpress shows the wordpress signup page for domain.com – domain.com/wp-signup.php?new=anything – and the page states that anything.domain.com does not exist. This is expected behavior right? Since the request is being handled by wordpress and I am not getting a 404 error, I am inclined to think that the wildcard DNS is working as it should.

    However, for some yet unknown reason, my installation is handling a new site in the same manner. I added testsite as a new site. All links show it as testsite.domain.com, but when I click on the links I end up at domain.com/wp-signup.php?new=testsite on which the page states that testsite.domain.com does not exist.

    Now if I specifically add the subdomain as an A record, then the links work and I can get to the site and the dashboard, so I can get the multisite working, but I really need to get WordPress recognizing a newly generated site without having to create an A record for it.

    I’m sure I am missing something that is blatantly obvious. Any suggestions would be greatly appreciated.

    When I enter a random subdomain (anything.domain.com) wordpress shows the wordpress signup page for domain.com – domain.com/wp-signup.php?new=anything – and the page states that anything.domain.com does not exist. This is expected behavior right?

    yep, that’s how it works.

    However, for some yet unknown reason, my installation is handling a new site in the same manner. I added testsite as a new site. All links show it as testsite.domain.com, but when I click on the links I end up at domain.com/wp-signup.php?new=testsite on which the page states that testsite.domain.com does not exist.

    Now if I specifically add the subdomain as an A record, then the links work

    Uh… that’s not right.

    Here where you said

    and in Apache (via WHM/cPanel).

    what did you mean?

    Because you need to add a new line to the vhost entry in apache, not a new dns record in WHM. if you can get to http.conf in whm, i haven’t found it. 😉 (I prefer to do that bit command line anyway.)

    I suspect that bit’s not done quite right.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    if you can get to http.conf in whm, i haven’t found it.

    You can but you shouldn’t NEED to. You would really be adding them in via the domain-account cpanel.

    But the ServerAlias *.yourdomain.com has to go in httpd.conf or whatever file the vhost is in (depending on Apache & OS version, right?).

    That part. 🙂

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    But the ServerAlias *.yourdomain.com has to go in httpd.conf or whatever file the vhost is in (depending on Apache & OS version, right?).

    Yes BUT. All you need to do is in your cpanel add a subdomain named *

    Have it point to your public_html.

    This sets up wildcard dns and edits httpd.conf for you 🙂 Which is why I said add it via cPanel. I did it for ipstenu.org that way, even though I have access to WHM. If you edit httpd.conf directly and ever upgrade apache via WHM, you will LOSE your customization, so I really can’t recommend that to anyone.

    Huh. Did not know it edited the file for you too. COOL. (for once)

    Thread Starter shawn m

    (@s_mauldin)

    Okay, along the way I introduced some DNS errors, but they have been corrected, and yet my installation is still behaving the same way.

    @ipstenu: I verified that I have a wildcard subdomain entry in cPanel pointing to public_html.

    @andrea_r: I also went in and reviewed my httpd.conf. Here’s what is in the file for my wildcard DNS:

    <VirtualHost MyIP:80>
        ServerName *.domain
        ServerAlias *.domain
        DocumentRoot /home/user/public_html
        ServerAdmin webmaster@domain
        UseCanonicalName Off
        CustomLog /usr/local/apache/domlogs/_wildcard_.domain combined
        CustomLog /usr/local/apache/domlogs/_wildcard_.domain-bytes_log "%{%s}t %I .\n%{%s}t %O ."
        ## User user # Needed for Cpanel::ApacheConf
        <IfModule mod_suphp.c>
            suPHP_UserGroup user user
        </IfModule>
        <IfModule !mod_disable_suexec.c>
            SuexecUserGroup user user
        </IfModule>
        ScriptAlias /cgi-bin/ /home/user/public_html/cgi-bin/
    
        # To customize this VirtualHost use an include file at the following location
        # Include "/usr/local/apache/conf/userdata/std/2/user/wildcard_safe.domain/*.conf"

    Does anything look out of place? I greatly appreciate the help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Multisite (Subdomain) Not Finding New Sites’ is closed to new replies.