Title: Problem adding sub domains
Last modified: August 20, 2016

---

# Problem adding sub domains

 *  [ScottJSA](https://wordpress.org/support/users/scottjsa/)
 * (@scottjsa)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/problem-adding-sub-domains/)
 * Hi all,
 * I was hoping someone could offer some advice on this one.
 * I had a single WP install (www.example.com) and decided to upgrade to multi site
   version because I want different themes in different sub domains, but cross-site
   logins, and easy management (before I discovered multisite functionality, I setup
   a 2nd install on a sub domain dir.example.com).
 * The setup went fine and was able to get the main site working on the non-WWW 
   version of the domain fine (redirects in place from the www version) – all is
   good.
 * However, setting up a new site (dir.example.com and forum.example.com) it doesn’t
   work.
 * I think the issue is my hosting package. It allows sub domains to be setup as
   different hosting packages. For the single install of dir.example.com I originally
   setup a new hosting package for it, but deleted it after the multi-site upgrade.
 * I’ve setup a wildcard DNS entry for my root domain (A record “*” and IP address
   is the same as root/www), but trying to access dir shows an Apache holding page(
   which I think is a legacy from the previous subdomain setup as a different package).
   forum.example.com 301 redirects to example.com/forum and shows a 404 page from
   the main blog (this is default behaviour for the host – Fasthosts in the UK).
 * So *something* isn’t working – I’m assuming it’s down to the DNS – I followed
   the instructions here: [http://codex.wordpress.org/Create_A_Network](http://codex.wordpress.org/Create_A_Network)
   during the initial setup.
 * So my questions;
 * 1. Has anyone setup a multisite install with Fasthosts at all and know where 
   the problem might be?
 * 2. Given that I can setup subdomains via my cpanel, would I be better just doing
   that and setting the A records for root and www versions (of the subdomain) to
   the same IP as my main install, rather than using the wildcard solution?
 * 3. This is my first time installing multi site and I’m a DNS newbie – are there
   any blatantly obvious things that I’m missing here?
 * Further info;
 * In my config file, I added:
 *     ```
       define('MULTISITE', true);
       define('SUBDOMAIN_INSTALL', true);
       $base = '/';
       define('DOMAIN_CURRENT_SITE', 'example.com');
       define('PATH_CURRENT_SITE', '/');
       define('SITE_ID_CURRENT_SITE', 1);
       define('BLOG_ID_CURRENT_SITE', 1);
       ```
   
 * My htaccess:
 *     ```
       RewriteEngine On
       RewriteBase /
       RewriteRule ^index\.php$ - [L]
   
       # uploaded files
       RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
   
       RewriteCond %{REQUEST_FILENAME} -f [OR]
       RewriteCond %{REQUEST_FILENAME} -d
       RewriteRule ^ - [L]
       RewriteRule . index.php [L]
       ```
   
 * I’d appreciated any help you can offer.
    Thanks, Scott

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [ScottJSA](https://wordpress.org/support/users/scottjsa/)
 * (@scottjsa)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/problem-adding-sub-domains/#post-3067719)
 * Just to add to this, I’ve been chatting with my hosting company’s support desk
   to no avail.
 * I’ve setup separate subdomains for both forum.example.com and dir.example.com,
   with root and WWW A records for each set to the same IP address as [http://www.example.com](http://www.example.com).
 * The sub domains are resolving and showing an apache server test page. A header
   checker shows the correct IP address, but 403 forbidden response.
 * The hosting is shared hosting, which is suspect may be at the crux of the problem,
   but I’ve read that multi-site setup can be fine on shared hosting.
 * What I’m trying to figure out is where the process is failing. Sub domains are
   resolving properly. Multi site is working properly as far as I can tell. Is this
   a server issue that’s simply not passing the subdomain request to the WP install?
 * Scott
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [13 years, 8 months ago](https://wordpress.org/support/topic/problem-adding-sub-domains/#post-3067774)
 * > Given that I can setup subdomains via my cpanel, would I be better just doing
   > that and setting the A records for root and www versions (of the subdomain)
   > to the same IP as my main install, rather than using the wildcard solution?
 * Actually … See fi you can make a subdomain called *
 *  Thread Starter [ScottJSA](https://wordpress.org/support/users/scottjsa/)
 * (@scottjsa)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/problem-adding-sub-domains/#post-3067792)
 * I can setup a wildcard DNS via “advanced DNS” options in my control panel.
 * I can also setup a subdomain via the main domain in control panel. However that
   method requires me to assign a subfolder to hold the content and when setup the
   subdomain automatically 301 redirects to that sub folder. Via this option, I 
   can’t add * as the subdomain name. I think this is basically just a quick and
   easy way for their customers to setup a SD without managing a new site.
 * The third option is to setup a SD via a new hosting package, which works and 
   lets me manage the DNS of the subdomain. However, I was advised by the hosting
   company not to do this (as it would conflict with the main domain DNS settings
   if I already have those subdomains setup).
 * The exact advice was:
 * > If you create the sub-domain/directory on the parent package and use a 301 
   > redirect back into the parent root directory. You’d need to remove the existing
   > sub-domain so the DNS records go back to default.
 * Which I’ve done. The effect that has is;
 * dir.example.com 301s to example.com/dir (server does this automatically). I then
   301 example.com/dir to example.com which just shows the main site as you’d expect.
 * TBH, I’m not sure the hosting company are familiar enough with the setup to understand
   what is needed, and I don’t have the knowledge to be able to explain it well.
 * Scott
 *  Thread Starter [ScottJSA](https://wordpress.org/support/users/scottjsa/)
 * (@scottjsa)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/problem-adding-sub-domains/#post-3067793)
 * BTW if it helps, the site is: jobseekersadvice.com and the SD I’m trying to setup
   are forum. and dir.
 * Thanks,
    Scott
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [13 years, 8 months ago](https://wordpress.org/support/topic/problem-adding-sub-domains/#post-3067821)
 * > I can setup a wildcard DNS via “advanced DNS” options in my control panel.
 * Yes. I said _subdomain_ 🙂 These are totally different things.
 * > I can also setup a subdomain via the main domain in control panel. However 
   > that method requires me to assign a subfolder to hold the content and when 
   > setup the subdomain automatically 301 redirects to that sub folder. Via this
   > option, I can’t add * as the subdomain name. I think this is basically just
   > a quick and easy way for their customers to setup a SD without managing a new
   > site.
 * Why not? What happens if you DO put in *?
 * If you have to manually name your subdomains, just assign it to the folder where
   WP is installed. (so instead of /public_html/subdomain/, just point it to /public_html/)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Problem adding sub domains’ is closed to new replies.

## Tags

 * [A records](https://wordpress.org/support/topic-tag/a-records/)
 * [dns](https://wordpress.org/support/topic-tag/dns/)
 * [Fasthosts](https://wordpress.org/support/topic-tag/fasthosts/)
 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)
 * [multi-site](https://wordpress.org/support/topic-tag/multi-site/)
 * [sub-domains](https://wordpress.org/support/topic-tag/sub-domains/)

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 5 replies
 * 2 participants
 * Last reply from: [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/problem-adding-sub-domains/#post-3067821)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
