I've 2 hosts and I must point a subdomain on host someone to a subdomain on host two:

subdomain.hostone.com --> subdomain.hosttwo.com

I added a CNAME record to host one which points to subdomain.hosttwo.com but all I recieve is really a '400 Bad Request' Error.

Can anybody see what I am doing wrong?

I believe some of the solutions hit round the possible means to fix your condition.

To be sure the simplest (and finest solution for Search engine optimization reasons) may be the 301 redirect. In IIS this really is fairly trivial, you'd produce a site for subdomain.hostone.com, after creating the website, right-click the site and get into qualities. Click the "Home Directory" tab from the site qualities window that opens. Choose radio stations button "A redirection to some URL", go into the url for that new site (http://subdomain.hosttwo.com), and appearance the checkboxes for "The precise URL joined above", "A lasting redirection with this resource" (this second checkbox leads to a 301 redirect, rather than a 302 redirect). Click OK, and you are done.

Or you might produce a page on the website of http://subdomain.hostone.com, using among the following techniques (based on exactly what the hosting platform supports)

PHP Redirect:


Header( "HTTP/1.1 301 Moved Permanently" )

Header( "Location: " )


ASP Redirect:

<%@ Language=VBScript %>


Response.Status="301 Moved Permanently"

Response.AddHeader "Location","http://subdomain.hosttwo.com"


ASP .Internet Redirect:

<script runat="server">

private void Page_Load(object sender, System.EventArgs e)


Now presuming your CNAME record is properly produced, then the only issue you're going through would be that the site produced for http://subdomain.hosttwo.com is applying a shared IP, and host headers to find out which site ought to be displayed. To solve this problem under IIS, in IIS Manager on the internet server, you'd right-click the site for subdomain.hosttwo.com, and click on "Qualities". Around the displayed "SiteInch tab, you need to see an "Advanced" button near the Ip that you will need to click. Around the "Advanced Site Identification" window that seems, click "Add". Choose exactly the same Ip that's already getting used by subdomain.hosttwo.com, enter 80 because the TCP port, after which enter subdomain.hosttwo.com because the Host Header value. Click OK before you have returned towards the primary IIS Manager window, and you ought to be all set. Open a browser, and study to http://subdomain.hostone.com, and you will begin to see the site at http://subdomain.hosttwo.com appear, despite the fact that your URL shows http://subdomain.hostone.com

Hope that can help...

Try altering it to sudomain -> subdomain.hosttwo.com

The cname is definitely an alias for any certain domain, so when you attend the user interface for hostone.com, you should not need to go into the whole title in to the cname alias.

So far as the mistake you are receiving, are you able to visit subdomain.hostwo.com and appearance the logs?

It's most likely best/simplest to setup a 301 redirect. No DNS hacking needed.

It may sound such as the web server on hosttwo.com does not allow undefined domain names to become passed through. Additionally you stated you desired to perform a redirect, this is not really a technique for redirecting. Should you bought this domain through GoDaddy you might would like to use their redirection service.

You are able to only make DNS title pont to another Ip, if you you're using virtual hosts redirecting with DNS will not work.

Whenever you enter subdomain.hostone.com inside your browser it'll use DNS to obtain it's Ip (whether it's a CNAME it'll continue trying until it will get IP from the record) it will connect with that IP and send a http request with

Host: subdomain.hostone.com 

somewhere within the http headers.