0

This is my first experience with WordPress multisite and i followed all instructions from codex to make my website a multisite.
But my sub domains are not working and chrome is displaying this message for my sub domains.
DNS address could not be found.
Do i have to create sub domain all the time in my cpanel before creating new website (sub domain) in WordPress? I already have few sub domains which are working perfectly but these all are separate websites. Now i make my main domain a multisite but all sub domains are not working on this. Here is my htaccess code which is provided my WordPress

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]

I also add code in my wp-config file provided by WordPress and able to login into network panel and to create sub domains but when i try to visit any of the sub domain it displays DNS error. I will really appreciate it if someone will guide me about this. Thank you!

3

Do I have to create sub domain all the time in my cpanel before creating new website (sub domain) in WordPress?

You need to make sure that the subdomains are created somewhere. WordPress doesn't have the capability to create DNS entries for you.

If you've got WordPress set up on example.com and you want to create site1.example.com, site2.example.com, etc., you need to ensure that the DNS entries for site1.example.com, site2.example.com, etc., are active.

Depending on your hosting situation, you might be able to create wildcard subdomains, meaning that you can add *.example.com to your DNS entries, which would allow you to point anything ending in .example.com to your Multisite installation. This is something you'll need to research with your hosting company, though, and not something we can guide you through here.

Codex: Before You Create a Network » Domain-based

  • Thank you for your answer. But i have already tried to create sub domain on my account before creating this in WordPress but it is pointing to empty directory upon visit (Index of /cgi-bin/). As i mentioned earlier that i have already few sub domain websites on my host but these are separate websites and working perfectly so it mean my host allows to create sub domains. – wplearner Sep 24 '17 at 0:54
  • It sounds like your host has each subdomain point to its own directory. For Multisite to work, you'd need to point the relevant subdomains to the same directory as the main WordPress site. That's something you'll need to take up with your hosting provider. – Pat J Sep 24 '17 at 3:57
  • For my sub domain path is public_html/site1. Is it should be only public_html or i have to put there a complete path. My main website is installed at root level. – wplearner Sep 24 '17 at 4:22
  • 1
    Ok now it is working. Previously i was pointing this sub domain to public_html/site1 and when i remove site1 from my sub domain path then every thing started to work in a perfect way. Thank you so much for your help and time. I appreciate it and i am going to upvote your answer and to accept this. – wplearner Sep 24 '17 at 4:46
  • Good, glad to hear you got it working. – Pat J Sep 24 '17 at 4:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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