Lunarpages Web Hosting Forum

Author Topic: WordPress and Subdomains!!!  (Read 387 times)

Offline joshuapatel

  • Newbie
  • *
  • Posts: 4
WordPress and Subdomains!!!
« on: April 17, 2019, 03:41:04 AM »
I've installed multisite Wordpress on my account, but I'm having trouble with getting the subdomains to work right. I've also posted this question on the WordPress forums, but I have a feeling that the problem may have to do with LunarPages handling of subdomains, rather than with WordPress configuration. So I'll ask you guys as well.

The story is as follows:

I've installed subdomain-type multisite WordPress. I then went to the the network admin panel of WordPress, and told it to create a new site, using a new subdomain of my primary domain. According to the WordPress documentation, this is all you need do. However, when I tried to visit the site directly, I got a DNS error, saying the site didn't exist. Similarly, from within Wordpress, when I tried to go to the Dashboard of that new site, I got that same DNS error.

I then went to the LunarPages cPanel, and asked LunarPages to create the specific subdomain of interest. It created a new folder in my public_html, and apparently updated the DNS's. When I told my webbrowser to go to the subdomain, I got an Apache, "empty website error". So I put an index.html file in the subdomain folder, navigated again to the webbrowser, and was given the contents of the html file.

I went back to Wordpress, and tried again to visit the Dashboard for the new site/subdomain. This time, rather than a DNS error, I got a file not found error.

My thinking is this: Wordpress appears to expect subdomains to be mapped to the base public_html folder, so that Wordpress can deal with these requests itself. However, LunarPages has directed the DNS's to respond to subdomain requests with subfolders. Thus, when someone asks for a subdomain, they're sent to the subfolder, cutting WordPress out of the loop.

I think I need a way to alter LunarPages subdomain redirection protocol.

Any ideas?

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6429
Re: WordPress and Subdomains!!!
« Reply #1 on: April 17, 2019, 04:24:35 AM »
I seem to recall hearing about this years ago. It seemed that WP would take a domain address like '' and do some internal mapping of its own, rather than going to public_html/blog1/. This might have been referred to as dynamic subdomains. Anyway, then (and now) Lunarpages wasn't set up to handle things this way. A domain of must go to a physical subdirectory, and does not go to You can't create subdomains (or what appear to be subdomains) on the fly, such as I don't know if a way around this issue was ever found.

I have found one oddity in LP's handling of URIs is that if a subdirectory actually exists, it appears that lower level directories (parents) will be skipped and control goes directly to the highest actual subdirectory. This means that /.htaccess and so forth are actually skipped. If WP is counting on its /.htaccess entry to do something with a subdomain or a path, that could be a problem. You might ask about it over at the WP discussion group.
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-