CNAME? Redirect? Cloak?


#1

Hi all!

I’ve already done a search through the forum, and I’ve found many problems similar to mine, but none that mirror what I am trying to do. This could be because what I’m trying to do is just silly… I don’t know! :slight_smile:

I have a website fully hosted here at dreamhost www.mysite.com.

I have some .net hosting at another host which is currently hosting the beta version of “mysite”. It is using the domain www. betasite.com.

We want to create a beta.mysite.com subdomain that points to www.betasite.com. Thus leaving the existing www working and beta pointing to the .net host.

I’ve tried creating a CNAME entry that points to the beta hostname, but it doesn’t seem to be working. I get a 404 error.

I’ve tried to achieve the same thing to another site on dreamhost just to try and restrict the scope of problem. When I go to beta.mysite.com in this case I get this error.

Site Temporarily Unavailable

We apologize for the inconvenience. Please contact the webmaster/ tech support immediately to have them rectify this.
error id: “bad_httpd_conf”

If my understanding is correct (and it may not be), a CNAME is the right thing to do… it looks the IP address is resolving to the correct host, but that the site is pointing to the wrong place when it gets there. What am I missing?


#2

A CNAME takes the cooperation of the server on the other end to recognize that it’s pretending to be what the CNAME says.

If you can’t get the other site to pretend it’s beta.mysite.com, you’ll have to settle for a Redirect, or gasp a cloak, which is lame because it puts the other site in a frame and the URL in the nav bar will never change, as it’s in a frame that doesn’t change, while what’s inside the frame does change.

The other option is to move www.betasite.com over here and Mirror it. Mirroring only works with DreamHosted sites.

-Scott


#3

OK, so what do i need to do to the other server to get it to cooperate? Let’s assume they’re both on dreamhost for this argument. Do I need to add an A or CNAME?

I unfortunately cannot move the website because dreamhost don’t support .NET :slight_smile:


#4

Regardless of where it is, its web server configuration needs to know that it’ll be responding to beta.mysite.com requests. On Apache, it’s a ServerAlias.

As long as betasite.com only thinks it’s betasite.com, it’s not going to respond to beta.mysite.com, even if you use an A or CNAME record here. You need to find a way to get it to think it’s beta.mysite.com in addition to it already being betasite.com.

-Scott


#5

Thanks for your help. I think I understand the problem.

I was under the mistaken impression that when beta.mysite.com is looked up in a DNS that it would be essentially translated to betasite.com. e.g. requests arriving at betasite.com would actually be requesting betasite.com.

I guess what you’re saying is that the requests arrive at the final host as beta.mysite.com… which I guess makes sense. I’m not sure I have the ability to add other hostnames to the host. I will have to investigate further. Thanks!


#6

Create a .htaccess file in the beta.mysite.com directory:

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#7

Unfortuantely this changes the URL… which we want to stay as beta.mysite.com

Thanks though!


#8

Why?

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost