Due to my question being down voted I am trying to rewrite to make it useful for others and show that I have done research. I have also added "shared host" to the title to make it easier to find for other people with the same question . My original question is

  1. Is there something I need to do on the secondary server since it is a shared host?

After a little more search I may have found my answer and this is it is not possible on shared hosts unless you can configure the shared host, could someone please verify this or shed some light on my above question?

my above assumption is based on this Redirect subdomain.example.org to somethingelse.com hidden to the user? and in particular @Calman answer and the mention of using mod_proxy

orginal research and notes

I have set up a CNAME to point a sub-domain to a secondary server but the secondary server doesn't find the sub-domain(directory)

I have this configuration set up and it works, I use a CNAME to point a sub-domain to a sub-domain on another server, but I don't control the secondary server so I am trying to set up a test environment on 2 servers I have access to.

What I am trying to do works as stated above and I have also found this resource that explains it and have potsed it below http://www.sitepoint.com/forums/showthread.php?574207-Subdomain-hosted-on-another-server&p=3979559&viewfull=1#post3979559

What you want is known as CNAME. On your main host (1and1), you want to add a CNAME called "subdomain" to point to "subdomain.domain-on-secondary-host.com". Then on your secondary host, you want to create a subdomain and set it to the folder of the content you want, make sure you name the subdomain as the same thing you set the CNAME for. At which point, visiting subdomain.xyz.com should pull up content from the secondary host. You may need to contact 1and1 for the first task, unless they allow you to manage your own DNS entries.

below is the main A record and CNAME on the main domain

maindomain.net. 14400   IN  A   123.45.678.910
subdomain.maindomain.net.   14400   IN  CNAME   subdomain.sec.net

maindomain.net site is resolving and has been live for a few years on the current server subdomain.sec.net is resolving and test index.html is visible

subdomain.maindomain.net. finds the secondary server but I get the message below.

You are seeing this page because there is nothing configured for the site you have requested.

secondary server is a Bluehost shared server and as stated the subdomain.sec.net is set up as a subdomain and a directory was created in the public_html directory.

closed as off-topic by Iain, Rob Moir, Ward, mdpc, Jenny D Mar 30 '16 at 13:46

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – Iain, Rob Moir, mdpc, Jenny D
If this question can be reworded to fit the rules in the help center, please edit the question.


The web server needs to be properly configured to handle requests for subdomain.maindomain.net; it looks like it's currently configured to only asnwer requests for subdomain.sec.net, so when you call it using the name subdomain.maindomain.net it replies with an error message.

The actual configuration depends on the web server: that would be a VirtualHost in Apache, a site binding in IIS, and so on; if yours is a shared server, then this configuration will be managed by your hosting provider or by some control panel; either way, you need to tell the server it should accept requests for subdomain.maindomain.net, and reply with the same contents it uses for subdomain.sec.net.

  • Thank you , how exactly can that be done, as I have since posted (maybe you didn't read it as you seemed to answer while I was editing) you can possibly use mod_proxy for what you suggest. Do you have any good resources to point me to or another way ? – simon Mar 23 '16 at 23:36
  • It depends on the web server, and on how much (and what type of) administrative access you have to it. – Massimo Mar 23 '16 at 23:49
  • Thanks again, I am going to go with on a shared host it is not likely that what I was trying to achieved is possible due to shared IP and as noted on bluehost (my shared host) "We do not provide support for any client's requests for modifying the httpd.conf." which is what you would need to do.... off to try it on a VPS – simon Mar 24 '16 at 0:11

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