Support » Developing with WordPress » Error loading site in Multisite network – site can’t be reached

  • Hi everyone,
    I am still new to WordPress. Today I have tried to create a multisite netowrk for the first time. Everything went well before I configure multisite as subdoamin form admin. I have received the following message:

    Warning! Wildcard DNS may not be configured correctly!
    The installer attempted to contact a random hostname (2145a7.localfitnesszone.com) on your domain. This resulted in an error message: cURL error 28: Resolving timed out after 5514 milliseconds
    To use a subdomain configuration, you must have a wildcard entry in your DNS. This usually means adding a * hostname record pointing at your web server in your DNS configuration tool.
    You can still use your site but any subdomain you create may not be accessible. If you know your DNS is correct, ignore this message.

    However I went ahead and added a new site as fruits.localfitnesszone.com but cannot access the site.

    This site can’t be reached
    fruits.localfitnesszone.com’s server DNS address could not be found.

    Btw, the main site localfitnesszone.com is running fine.

    I checked the database and 9 tables are duplicated as it should be.

    I have no idea how to get out of this situation. I hope somebody can help me to understand what I need to do in order to make the subdomain site up and running on my localhost.

    Environment: Local (localhost)
    OS: Ubuntu 14.04 LTS
    WP version: 4.7.3

    Kind regards,
    Subrata Sarkar

Viewing 14 replies - 1 through 14 (of 14 total)
  • Moderator bcworkz

    (@bcworkz)

    Like the message said, in order to have randomly named subdomain sites, you need a wildcard entry in your DNS zone file. If this is not possible, you cannot have random subdomain names. To have limited subdomain URLs without wildcards, you need a rewrite rule in your .htaccess file that rewrites fruits subdomain requests to /site/fruits/. A similar rule is required for every subdomain.

    You should be able to edit your DNS zone file through your domain registrar account. Exactly how is variable, and as I alluded to, some registrars do not allow wildcards. You should be able to find specific directions through the registrar’s help system, or sometimes a general Internet search. Don’t forget that zone file changes take a while to propagate through the ‘net. The time depends on the TTL setting. The time is often around 24 hours.

    Thank you for your reply. My site is not hosted on any server yet. I am wokring at my local environment (localhost).

    This is how my .htaccess looks:

    
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    

    “…you need a wildcard entry in your DNS zone file”, where do I find it? Can you please suggest a couple of tutorials about multisite, DNS zone files etc?

    Sorry for my beginner level knowledge in WordPress. Please bear with me.

    Kind regards

    Hi,
    Are you using the XAMPP SERVER or WAMP SERVER? How did you setup the local web server?
    Thanks
    Mohammad

    • This reply was modified 2 years, 8 months ago by  mdshak.

    Thanks for your reply.
    I am not using any of those. I am on Ubuntu 14.04 LTS.

    As far as setting up apache and local server are concerned I used phpbrew for this.

    I posted my question here with more detail:

    http://stackoverflow.com/questions/42857061/wordpress-multisite-setup-as-subdomain-wildcard-dns-record-setup

    Hi,
    First delete your code in carbazarlocal.com.conf file and use this code in In /etc/apache2/sites-available/carbazarlocal.com.conf.

    <VirtualHost *:80>
         ServerAdmin admin@carbazarlocal.com
         ServerName carbazarlocal.com
         ServerAlias *.carbazarlocal.com
         DocumentRoot /var/www/html/carbazar
    </VirtualHost>

    Thanks
    Mohammad

    Thanks for you reply!

    Just did what you said. Also restarted apache service (sudo service apache2 restart) Still I can see the text “You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.”.

    Here is a screenshot: http://prnt.sc/el3nvw

    Hi,
    Please share the code of apache config file through pastebin. I will check and try to resolve.
    Thanks
    Mohammad

    Hi,
    Thank you so much for taking time with my my problem and continuous help!

    /etc/apache2/apache2.conf:
    http://pastebin.com/UZwKZbG7

    /etc/apachae2/sites-availabe/carbazarlocal.com.conf
    http://pastebin.com/L8fk8LVN

    /etc/hosts:
    http://pastebin.com/qeXJ5vDi

    Hi,
    I see that you have removed this http://pastebin.com/L8fk8LVN.
    Thanks
    Mohammad

    Hi Mohammad,

    Which one you are pointing to? Right now I have *.carbazarlocal.com as ServerAlias in etc/apache2/sites-available/carbazarlocal.com.conf as per your suggestion.

    But still network setup page shows the same message: “You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.” I restarted apache few times with no avail. Shall I ignore this message and go ahead? What and where I am doing wrong?!

    Kind regards.

    Hi Mohammad,
    Getting back to you for one more time.
    Here is what I have now:

    /etc/hosts file:
    127.0.0.1 carbazarlocal.com

    /etc/apache2/sites-available/carbazarlocal.com.conf:

    <VirtualHost *:80>
       ServerAdmin admin@carbazarlocal.com
       ServerName carbazarlocal.com
       ServerAlias *.carbazarlocal.com
       DocumentRoot /var/www/html/carbazar
       ErrorLog /var/www/html/carbazar/httpdocs/logs/error.log
       CustomLog /var/www/html/carbazar/httpdocs/logs/access.log combined
    </VirtualHost>

    /etc/apache2/apache2.conf:

    <Directory /var/www/html/carbazar>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    /var/www/html/carbazar:
    define('WP_ALLOW_MULTISITE', true);

    /etc/dhcp/dhclient.conf
    prepend domain-name-servers 127.0.0.1; (uncommented)

    /etc/dnsmasq.d/carbazarlocal.conf
    address=/carbazarlocal.com/127.0.0.1

    Terminal commands used:

    $ sudo update-rc.d dnsmasq enable
    (since 14.04 does not recognize systemctl as no systemd is present).

    $ dig car-dealer.carbazarlocal.com

    Output:

    
    ; <<>> DiG 9.9.5-3ubuntu0.13-Ubuntu <<>> magnum-auto.carbazarlocal.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 48418
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;magnum-auto.carbazarlocal.com.	IN	A
    
    ;; Query time: 4043 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Tue Mar 21 16:16:30 IST 2017
    ;; MSG SIZE  rcvd: 58
    

    When hit INSTALL on Network Setup screen I get the following:

    Warning! Wildcard DNS may not be configured correctly!
    The installer attempted to contact a random hostname (a3de05.carbazarlocal.com) on your domain. This resulted in an error message: cURL error 28: Resolving timed out after 5515 milliseconds
    To use a subdomain configuration, you must have a wildcard entry in your DNS. This usually means adding a * hostname record pointing at your web server in your DNS configuration tool.
    You can still use your site but any subdomain you create may not be accessible. If you know your DNS is correct, ignore this message.

    What I have done wrong now? I really need this multisite setup to run on my localhost 🙁

    Environment: local (localhost)
    OS: Ubuntu 14.04 LTS
    WordPress version: 4.7.3

    Hi,
    Can you create the sub domain manually. After that create the Multisite with this subdomain.
    Thanks
    Mohammad

    Hi,
    Thanks again for your quick reply. You mean you want me to create sub domain entries manually in hosts and apache.conf file? Sorry I did not understand fully. Please bear with my beginner knowledge.

    Hi,
    Yes, create the subdomain manually.
    Thanks
    Mohammad

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Error loading site in Multisite network – site can’t be reached’ is closed to new replies.