DNS Setup Question


#1

I have two websites. One that is hosted here a DreamHost and another a GoDaddy.

www.mysite.com is at GoDaddy.
www.mysite.net is at DreamHost.

I wanted to create a ww2.mysite.com that would go to www.mysite.net. I created a CNAME on .com site at GoDaddy. Now when I ping ww2.mysite.com I get the correct IP Address at DreamHost but I get the following error message:

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”

Thanks,
-Greg


#2

I’m not overly familiar with custom DNS entries, but if you used the IP address for your server in the CNAME entry that would explain the problem. The IP address of your machine is shared by several other people so you can’t directly access any site by going to that IP address.

I believe what’s happening is when you go to ww2.example.com the request is being forwarded to your DH server for ww2.example.com - which that machine doesn’t have hosted.

It would be simplest and best to set up a forwarding (sub)domain to point to your DH domain. You shouldn’t really use the IP address for your machine as it may change from time to time - and then your site will break.

–Matttail
art.googlies.net - personal website


#3

Let us know if Mattail is right and you set up your CNAME to an IP address, because setting up a CNAME for ww2 to www.mysite.net should work and as Mattail says, will save you from having to change the IP address if you actually want to set up a redirecting or mirroring subdomain at DreamHost.

Note that if you set up redirecting or mirroring at GoDaddy, you don’t have to set a manual A record since GoDaddy will presumably manage the A record for the subdomain that you’re hosting/mirroring at GoDaddy.

Free unique IP and $67 off with promo code [color=#CC0000]FLENSFREEIP67[/color] or use [color=#CC0000]FLENS97[/color] for $97 off. Click here for more options


#4

Well, no. I didn’t set the CNAME to point to an IP Address. I set CNAME of ww2 to point to greddin.net.

How should I set this up properly?

Thanks.


#5

Ok, I think I’ve got it. If someone else has a better understanding or explanatin of how CNAME entries work, please chime in! BTW, this explanation conflicts with my previous response, so please ignore my prevous post unless you want to make fun of me! :slight_smile:

So CNAME entries work for DNS resolution for server IP addresses and mail addresses. You’re using it for webserver IP address resolution.

You have a CNAME of ww2 pointing to greddin.net - something like this:
ww2 CNAME greddin.net

My understanding of what this does is when the browser goes to the resolve ww2.greddin.com, it gets the CNAME record back. It then does another lookup for greddin.net and gets back the A record pointing to the IP address of your DreamHost server. Now it sends a request to port 80 of the machine at that IP address with an http host header of “host: ww2.greddin.com”. This totally confuses DreamHost’s server because you haven’t told it anything about ww2.greddin.com. This is consistent with your observations.

I don’t think you’re going to be able to get this to work out well with a CNAME record for reasons I’ll detail at the end of this post.

Here are your two choices for getting ww2.greddin.com to work:

  1. Host ww2.greddin.com at GoDaddy with a redirect, mirror, or cloak to www.greddin.net.
  2. Host ww2.greddin.com at DreamHost with a redirect, mirror, or cloak to www.greddin.net.

Option 1 has the benefit of not requiring you to enter any IP addresses manually and so you’re immune to DreamHost changing the IP addresses. Option 2 has the benefit of working even when GoDaddy web hosting is down but name service is up.

Let me know which one of these two options you want and someone here (maybe even me!) will be able to give you detailed instructions on the steps to achieve it.

Why do I think the CNAME solution won’t work to get DNS resolution for ww2.greddin.com’s IP address? It’s because there’s no absolutely correct server name to put into the CNAME record. What you need is to put in a server name that always resolves to the IP address of ww2.greddin.com at DreamHost. But because DreamHost potentially assigns different IP addresses to each domain and subdomain, there’s no guarantee that ww2.greddin.com will share an IP address with any particular other hostname. Yes, it’s true. ww2.greddin.com and greddin.com may have different IP addresses!

This post ended up being way more complicated than I originally thought it would and I apologize for that…

Free unique IP and $67 off with promo code [color=#CC0000]FLENSFREEIP67[/color] or use [color=#CC0000]FLENS97[/color] for $97 off. Click here for more options


#6

Thanks Lensman. I think you hit the nail on the head. I think I’d like to go with Option #1. But I’d have to see if I can cloak or setup a mirror in GoDaddy’s DNS control panel.

Thanks again for the excellent response.

-Greg