DNS service for Heroku

110 views
Skip to first unread message

JM

unread,
Jun 18, 2009, 11:47:45 PM6/18/09
to Ruby or Rails Oceania
Hi,

I'm trying to find a reliable and possibly free DNS service that
allows CNAME mapping of the root level domain.

This is for Heroku so it would look something like:

domain.ch CNAME proxy.heroku.com

I can't use GoDaddy because it is for an unsupported top level domain
and I tried everydns.com but they don't seem to allow CNAME mapping
for the root level.

Does anyone has an idea?

Cheers,

JM

Bodaniel Jeanes

unread,
Jun 18, 2009, 11:51:49 PM6/18/09
to rails-...@googlegroups.com
I use slicehosts DNS tools for exactly this (with heroku)

You could create a slicehost plan then cancel the slice immediately. You keep your log in and DNS services for free. Then just set the nameservers for the domain to the slicehost ones and add in your entry in their panel (manage.slicehost.com)

Easy =)

Jean-Marie Schweizer

unread,
Jun 19, 2009, 12:18:52 AM6/19/09
to rails-...@googlegroups.com
Hhm, I wonder though if they really appreciate that. Don't they mind squatting the DNS without paying for a slice?

Bodaniel Jeanes

unread,
Jun 19, 2009, 12:20:39 AM6/19/09
to rails-...@googlegroups.com
It's a fair question but I don't have an answer.

Wei Feng

unread,
Jun 19, 2009, 12:50:52 AM6/19/09
to rails-...@googlegroups.com
Hi,

Have you tried another free DNS hosting editdns.net?
(though I don't know if they support this or not)

On Fri, Jun 19, 2009 at 1:47 PM, JM<jeanmarie...@gmail.com> wrote:
>
--
Regards,
Wei Feng

0433 317 059 | win...@gmail.com | http://wei.feng.id.au

Gus Gollings

unread,
Jun 19, 2009, 12:36:17 AM6/19/09
to Ruby or Rails Oceania
On Jun 19, 1:47 pm, JM <jeanmarie.schwei...@gmail.com> wrote:
> I'm trying to find a reliable and possibly free DNS service that
> allows CNAME mapping of the root level domain.

http://zoneedit.com is free for up to five domains. I've had no
service-level issues in ten years on their free accounts.

Regards,

Gus

Gus Gollings

unread,
Jun 19, 2009, 12:06:42 AM6/19/09
to rails-...@googlegroups.com
On 19/06/2009, at 1:47 PM, JM wrote:
> I'm trying to find a reliable and possibly free DNS service that
> allows CNAME mapping of the root level domain.

I've been using http://www.zoneedit.com/ for this kind of thing for
about ten years - it's a very good service (but the interface is
hilariously old fashioned).

Regards,

Gus

Jean-Marie Schweizer

unread,
Jun 19, 2009, 1:30:13 AM6/19/09
to rails-...@googlegroups.com
@Bodaniel

OK, just not sure if I can risk it because I don't hand to be caught in the middle of the night with no DNS service.

@Wei 

No, haven't tried editdns.net, but I will.

@Gus

LOL! I looked at zoneedit.com first, but then hesitated because of it's crappy looking design. Just didn't communicate a lot of confidence and reliability. But hey, sounds like they know what they are doing.

Thanks guys... I try to find out if one of these services allow root level CNAME mapping. If you or anyone knows more sites I'd appreciate to hear about it.

Cheers,

JM

Chris Lloyd

unread,
Jun 19, 2009, 1:36:22 AM6/19/09
to rails-...@googlegroups.com
2009/6/19 Gus Gollings <gus.go...@gmail.com>

I've been using http://www.zoneedit.com/ for this kind of thing for
about ten years - it's a very good service (but the interface is
hilariously old fashioned).

+1 on zoneedit.com. Pat recommended them to me a few months ago and they've been really good.

Chris

--

Dave Bolton

unread,
Jun 19, 2009, 1:41:52 AM6/19/09
to rails-...@googlegroups.com
> +1 on zoneedit.com. Pat recommended them to me a few months ago and they've
> been really good.

The downside for ZoneEdit is once you've used your 5 free zones,
you've used them forever.

For instance: I had 4 'zones', added a few more, giving me 6 or 7 (at
about ~$10 / year each). When I later removed some (bringing me back
under 5), I still had to pay.

They also overcharged me once, but were pretty good about refunding.

For DNS, I've been happier with Slicehost -- newer interface, and free
(with my slice).

Cheers,
Dave

Yun Huang Yong

unread,
Jun 19, 2009, 1:12:37 AM6/19/09
to rails-...@googlegroups.com
At 01:47 PM 19/06/2009, you wrote:
I can't use GoDaddy because it is for an unsupported top level domain
and I tried everydns.com but they don't seem to allow CNAME mapping
for the root level.

Its not a provider specific issue.
https://support.dnsmadeeasy.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=14

yun

--
                                    (__)    Share what you know.
Yun Huang Yong              `\------(oo)    Learn what you don't.
gu...@mooh.org                ||    (__) --'
goos...@yahoo.com      \|/   ||w--||        \|/
--

Jean-Marie Schweizer

unread,
Jun 19, 2009, 1:56:44 AM6/19/09
to rails-...@googlegroups.com
@yun

I'm aware of the regulation. However, that doesn't help me with Heroku. If I wanted to point my root level domain to Heroku I have to use CNAME mapping for my root level.

JM

Xavier Shay

unread,
Jun 19, 2009, 2:56:21 AM6/19/09
to rails-...@googlegroups.com

Xavier Shay

unread,
Jun 19, 2009, 2:58:34 AM6/19/09
to rails-...@googlegroups.com
On 19/6/09 4:56 PM, Xavier Shay wrote:
> http://wtfdns.com
actually sorry I didn't check they do exactly what you want
email their support if they don't though, they're pretty nice and will
probably just add it

Jean-Marie Schweizer

unread,
Jun 19, 2009, 3:19:03 AM6/19/09
to rails-...@googlegroups.com
Xavier,

it looks like that wtfdns.com doesn't choke on a root level CNAME mapping. I've setup the records and sent them an email to find out if it will work that way.

Thanks for the tip.

I keep everyone posted how I go.

Cheers,

JM

Jean-Marie Schweizer

unread,
Jun 19, 2009, 8:23:53 PM6/19/09
to rails-...@googlegroups.com
Update from the DNS Heroku Saga:

Well, Xavier was right, wtfdns.com really has a great support.

They have voiced the concern that when using CNAME mapping for the root domain that my MX records (setup for google mail) won't be recognized. They suggested to use ALIAS instead, which failed to do what we were hoping for. Apparently, ALIAS causes the same problem as CNAME does.

Going back to Heroku support, real good as well, I voiced my concern about the MX records.  They replied that although it is problematic to use CNAME on the root domain by usingproxy.heroku.com. the MX records should be fine.

This shows that the planned DNS add-on for the Heroku accounts is well needed to take away the pain of dealing with all that. Ultimately, it is the easiness of Heroku that causes me to switch and be done with configuring servers while focussing on programming.

For the DNS experts, these are the DNS records that I plan to use:

mail CNAME ghs.google.com.
www  CNAME proxy.heroku.com.

According to Heroku this should be fine, according to wtfdns.com the MX records won't be recognized. What do you think?

JM

Dr Nic Williams

unread,
Jun 20, 2009, 12:49:46 AM6/20/09
to rails-...@googlegroups.com
Assuming it works, now someone just needs to write a wtfdns executable to set all this up for each new mydomain.com
--
Dr Nic Williams
Mocra - Premier iPhone and Ruby on Rails Consultants
w - http://mocra.com
twitter - @drnic
skype - nicwilliams
e - dr...@mocra.com
p - +61 412 002 126 or +61 7 3102 3237

Mike Bailey

unread,
Jun 20, 2009, 2:50:47 AM6/20/09
to rails-...@googlegroups.com
On Sat, Jun 20, 2009 at 10:23 AM, Jean-Marie Schweizer
<jeanmarie...@gmail.com> wrote:
>
> For the DNS experts, these are the DNS records that I plan to use:
> mydomain.com.  MX  10  aspmx.l.google.com.
> mydomain.com.  MX  20  alt1.aspmx.l.google.com.
> mydomain.com.  MX  20  alt2.aspmx.l.google.com.
> mydomain.com.  MX  30  aspmx2.googlemail.com.
> mydomain.com.  MX  30  aspmx3.googlemail.com.
> mydomain.com.  MX  30  aspmx4.googlemail.com.
> mydomain.com.  MX  30  aspmx5.googlemail.com.
> mydomain.com.  CNAME   proxy.heroku.com.
> mail CNAME ghs.google.com.
> www  CNAME proxy.heroku.com.


Hi Jean-Marie,

You cannot have a CNAME for mydomain.com if you have MX (or any other
records) for it.

You can find the authoritative answer in RFC 1034.
http://tools.ietf.org/html/rfc1034

- Mike

3.6.2. Aliases and canonical names

In existing systems, hosts and other resources often have several names
that identify the same resource. For example, the names C.ISI.EDU and
USC-ISIC.ARPA both identify the same host. Similarly, in the case of
mailboxes, many organizations provide many names that actually go to the
same mailbox; for example Mocka...@C.ISI.EDU, Mocka...@B.ISI.EDU,
and P...@ISI.EDU all go to the same mailbox (although the mechanism
behind this is somewhat complicated).

Most of these systems have a notion that one of the equivalent set of
names is the canonical or primary name and all others are aliases.

The domain system provides such a feature using the canonical name
(CNAME) RR. A CNAME RR identifies its owner name as an alias, and
specifies the corresponding canonical name in the RDATA section of the
RR. If a CNAME RR is present at a node, no other data should be
present; this ensures that the data for a canonical name and its aliases
cannot be different. This rule also insures that a cached CNAME can be
used without checking with an authoritative server for other RR types.

Jean-Marie Schweizer

unread,
Jun 20, 2009, 6:33:46 AM6/20/09
to rails-...@googlegroups.com
Hi Mike,
 
You cannot have a CNAME for mydomain.com if you have MX (or any other
records) for it.

You can find the authoritative answer in RFC 1034.
http://tools.ietf.org/html/rfc1034

While you might have RFC on your side, it actually works regardless.

Cheers,

JM 

Mike Bailey

unread,
Jun 20, 2009, 9:22:29 PM6/20/09
to rails-...@googlegroups.com

Ignoring Internet standards can cause you *and others* pain in future.
Think IE vs. Firefox.

It sounds like you've found a provider that doesn't follow the DNS
standard. If you architect your system to depend on undocumented
functionality you may find yourself locked into a certain DNS
implementation. That's fine if it's what you want to do.

I would be wary of posting what might be considered an "anti pattern"
to a list where many people would not know better than to copy it.

The standards compliant solution to this problem is to point
example.com to an IP that sends an http redirect.

- Mike

maculike2:~ mbailey$ curl -I google.com
HTTP/1.1 301 Moved Permanently
Location: http://www.google.com/
Content-Type: text/html; charset=UTF-8
Date: Sun, 21 Jun 2009 01:21:13 GMT
Expires: Tue, 21 Jul 2009 01:21:13 GMT
Cache-Control: public, max-age=2592000
Server: gws
Content-Length: 219

maculike2:~ mbailey$ curl -I yahoo.com
HTTP/1.1 301 Moved Permanently
Date: Sun, 21 Jun 2009 01:21:19 GMT
Location: http://www.yahoo.com/
Cache-Control: private
Connection: close
Content-Type: text/html; charset=utf-8

maculike2:~ mbailey$ curl -I microsoft.com
HTTP/1.1 301 Moved Permanently
Connection: close
Date: Sun, 21 Jun 2009 01:21:27 GMT
Server: Microsoft-IIS/6.0
P3P: CP='ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo
OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI'
X-Powered-By: ASP.NET
X-UA-Compatible: IE=EmulateIE7
Location: http://www.microsoft.com
Content-Length: 31
Content-Type: text/html
Set-Cookie: ASPSESSIONIDQQBASQRS=IGGJFOJAFMNOKOILIHMODPEO; path=/
Cache-control: private

Jean-Marie Schweizer

unread,
Jun 20, 2009, 9:36:02 PM6/20/09
to rails-...@googlegroups.com
Hi Mike,

I though this was a forum to discuss solutions and share with others.

Anyway, you're right, I don't want to be responsible for people copying without thinking and then get into trouble. I've done this too many times myself.

It's probably better in this case that I stop posting my findings as it might push people to do things they shouldn't. Thanks for pointing this out.

Cheers,

Jean-Marie

Mike Bailey

unread,
Jun 21, 2009, 2:00:40 AM6/21/09
to rails-...@googlegroups.com
On Sun, Jun 21, 2009 at 11:36 AM, Jean-Marie
Schweizer<jeanmarie...@gmail.com> wrote:
<snip>

> It's probably better in this case that I stop posting my findings as it
> might push people to do things they shouldn't. Thanks for pointing this out.

It wasn't my intention to offend you or discourage you from sharing
your findings. There's nothing wrong with posting anti-patterns to a
list. With enough eyeballs, they'll get pointed out. :-)

You responded that your solution works regardless of the RFC stating
it should not be done like that. This gave me the impression that you
didn't care whether your solution was standards compliant, as long as
it works for you with your current provider. I was responding to that
message.

Internet standards make our lives better. Imagine where we would be if
no vendors followed them.

- Mike

Jean-Marie Schweizer

unread,
Jun 21, 2009, 2:37:47 AM6/21/09
to rails-...@googlegroups.com
Hi Mike,

Wasn't offended, actually. I really think you had a point and I totally agree with you that we should work according to RFC whenever possible.

I'm not a DNS expert and therefore at the 'mercy' of expert opinion. But, as you can imagine, even experts disagree! All I'm left with is making up my own mind and go with one solution, even if in retrospect I find out that I was wrong and half of the experts are going to tell me "told you so!".

I definitely don't have the expertise to make an informed and qualified statement in this case and I hope I didn't give the impression that I do. I'm asking for help and accept any credible response, regardless if RFC is violated or not, without judging if my actions are good or not. Hey, I'm ignorant, so how would I know. :-)

Anyway, I'm actually very suspicious about violating the RFC in this particular case. I doesn't make sense, that it should work. And I don't like to mess around with email. Yet, only one way to find out.

- JM

Nathan de Vries

unread,
Jun 21, 2009, 3:00:01 AM6/21/09
to rails-...@googlegroups.com
On 21/06/2009, at 4:37 PM, Jean-Marie Schweizer wrote:
> Anyway, I'm actually very suspicious about violating the RFC in this
> particular case.

Mixing CNAME and MX records is strangely common in the wild, despite
the very real risks of delivery failure. You're certainly not the
first (nor will you be the last) to make the mistake, since the bulk
of the material available on configuring DNS records tends to skip
over important details like these.


Cheers,

Nathan de Vries

Jean-Marie Schweizer

unread,
Jun 21, 2009, 5:08:43 AM6/21/09
to rails-...@googlegroups.com
Ok, so we all agree that it is not a good idea to use CNAME for the
root domain, but if I wanted to bring the focus back towards finding a
solution, what then?

Heroku is providing me an entry point of proxy.heroku.com and is
strongly discouraging the use of A records (see
http://docs.heroku.com/custom-domains where the note pic is):

"Why can't you use an A record, which is a hard-coded IP address?
Heroku is a cloud computing provider, and our front-end load balancers
will change IPs from time to time. When they do, any apps hard-coded
to point at a specific IP, instead than proxy.heroku.com, will stop
working. So we strongly discourage you from using A records."

But according to the RFC regulations, the following records will
potentially or most likely cause problems, because the MX records
could be ignored as the root domain is configured with a CNAME rather
than as an A record:

mail CNAME ghs.google.
mydomain.com. CNAME proxy.heroku.com.
www CNAME proxy.heroku.com.

Is there any solution that might work? What would you do if you had to
set the website up for Heroku while keeping the emails alives?

- JM

Mike Bailey

unread,
Jun 21, 2009, 7:16:34 AM6/21/09
to rails-...@googlegroups.com
On Sun, Jun 21, 2009 at 7:08 PM, Jean-Marie
Schweizer<jeanmarie...@gmail.com> wrote:
>
> Ok, so we all agree that it is not a good idea to use CNAME for the
> root domain, but if I wanted to bring the focus back towards finding a
> solution, what then?

<snip>

> Is there any solution that might work? What would you do if you had to
> set the website up for Heroku while keeping the emails alives?
>
> - JM

The solution people like google, microsoft and yahoo use is to point
the root domain at a webserver that redirects to www.mydomain.com
which itself can be a CNAME. It's very simple to configure a webserver
to simply prepend www to the HOST in the http request. You can use
this for more domains in future without needing to update the config.

mydomain.com. A 1.2.3.4
www.mydomain.com. CNAME proxy.heroku.com.

If you look around you'll see this is the common solution.

Myles Byrne

unread,
Jun 21, 2009, 8:29:05 PM6/21/09
to rails-...@googlegroups.com
On Sun, Jun 21, 2009 at 9:16 PM, Mike Bailey <mi...@bailey.net.au> wrote:

On Sun, Jun 21, 2009 at 7:08 PM, Jean-Marie
Schweizer<jeanmarie...@gmail.com> wrote:
>
> Ok, so we all agree that it is not a good idea to use CNAME for the
> root domain, but if I wanted to bring the focus back towards finding a
> solution, what then?

<snip>

> Is there any solution that might work? What would you do if you had to
> set the website up for Heroku while keeping the emails alives?
>
> - JM

The solution people like google, microsoft and yahoo use is to point
the root domain at a webserver that redirects to www.mydomain.com
which itself can be a CNAME. It's very simple to configure a webserver
to simply prepend www to the HOST in the http request. You can use
this for more domains in future without needing to update the config.

mydomain.com.    A           1.2.3.4
www.mydomain.com.    CNAME proxy.heroku.com.


This is what I do with heroku. 

For example myles.id.au works like this

myles.id.au. 6877 IN A 69.72.142.98
myles.id.au. 6877 IN A 216.98.141.250

where 69.72.142.98, 216.98.141.250 are two webservers (run by zoneedit) who's sole job is to transform http://myles.id.au/bla into: http://www.myles.id.au/bla

and www.myles.id.au looks like:

myles.heroku.com. 10158 IN CNAME heroku.com.
heroku.com. 4185 IN A 75.101.163.44
heroku.com. 4185 IN A 75.101.145.87

so requests to www.myles.id.au get routed to the heroku frontends.

Aesthetically I prefer redirecting http://www.myles.id.au/foo to http://myles.id.au/foo ... but ultimately I decided it wasn't worth have non-compliant domain records for. I want my email to work reliably. 

The reason heroku want a cname is so they have the flexibility to to change the target of the cname without breaking any customer sites. It allows them to do things like switch cloud services providers (unlikely) or add more frontend webservers (more likely) without forcing their customers to change their domain records. It's a decision that requires tradeoffs but a good one nonetheless.

-- Myles

Jean-Marie Schweizer

unread,
Jun 21, 2009, 8:37:47 PM6/21/09
to rails-...@googlegroups.com
Hey Miles,

> myles.id.au. 6877 IN A 69.72.142.98
> myles.id.au. 6877 IN A 216.98.141.250

That's definitely a way to go. I got to find out if wtfdns.com offers that.

> www.myles.id.au. 6558 IN CNAME myles.heroku.com.
> myles.heroku.com. 10158 IN CNAME heroku.com.
> heroku.com. 4185 IN A 75.101.163.44
> heroku.com. 4185 IN A 75.101.145.87

Would it still work if I used

www CNAME proxy.heroku.com.
mail CNAME ghs.google.com.
... MX records ...

I'm just a bit confused about your setup since it shows A records for
Heroku, which is exactly what they don't want you to do.

Anyway, thanks for the tip. I was wondering if a DNS service would
offer automatic redirection like you obviously have at zonenet.com.

- JM

Lincoln Stoll

unread,
Jun 21, 2009, 8:45:02 PM6/21/09
to rails-...@googlegroups.com
That's just resolver output - the DNS records are for heroku, but dig
will attempt to resolve CNAMES to a final IP address.

So ignore the heroku A records -
is the one to look at.

And it doesn't look like WTFdns does redirects.

Jean-Marie Schweizer

unread,
Jun 21, 2009, 9:16:44 PM6/21/09
to rails-...@googlegroups.com
> That's just resolver output - the DNS records are for heroku, but dig
> will attempt to resolve CNAMES to a final IP address.
>
> So ignore the heroku A records -
>
> www.myles.id.au.        6558    IN      CNAME   myles.heroku.com.
>
> is the one to look at.
>
> And it doesn't look like WTFdns does redirects.

Thanks for letting me know.

- JM

Jean-Marie Schweizer

unread,
Jun 21, 2009, 10:04:10 PM6/21/09
to rails-...@googlegroups.com
> myles.id.au. 6877 IN A 69.72.142.98
> myles.id.au. 6877 IN A 216.98.141.250

I changed my DNS at wtfdns.com to the above values. Doesn't seem to
work (just after a quick test). I assume that you need the DNS records
to be at zonenet.com for it to work?

- JM

Myles Byrne

unread,
Jun 22, 2009, 6:11:06 PM6/22/09
to rails-...@googlegroups.com
Yeah  you don't want to do that. 69.72.142.98 and 216.98.141.250 are webservers at zonedit.com. As some people have mentioned, zoneedit is free for the first few addresses. Not sure of any other providers that run a redirection service but you could probably set one up yourself if you have a cheap hosting account elsewhere, it's one line of PHP, something like

<?php set_header('Location', "http://www.myles.id.au" . $REQUEST['PATH_INFO'] + '?' + $REQUEST['QUERY_STRING']) ?>

(or something simliar, I just made that up, haven't done PHP in a while)

To answer your previous question. Yes, because your primary domain is an A record it's ok to also have MX (and NS and probably other) records on the same name, so your email will go to the right place.

Jean-Marie Schweizer

unread,
Jun 22, 2009, 6:37:20 PM6/22/09
to rails-...@googlegroups.com
> Yeah  you don't want to do that. 69.72.142.98 and 216.98.141.250 are
> webservers at zonedit.com. As some people have mentioned, zoneedit is free
> for the first few addresses. Not sure of any other providers that run a
> redirection service but you could probably set one up yourself if you have a
> cheap hosting account elsewhere, it's one line of PHP, something like

> <?php set_header('Location', "http://www.myles.id.au" .
> $REQUEST['PATH_INFO'] + '?' + $REQUEST['QUERY_STRING']) ?>
> (or something simliar, I just made that up, haven't done PHP in a while)

Thanks Mike, that certainly is a way to solve it. Once I have a web
server I could also just simply use HTML redirection.

However, that would kind of defeat the purpose of trying to reduce
complexity by moving from Slicehost to Heroku. I'm trying to reduce
the number of players if at all possible. So far, those are my
options.

1 Player: Heroku offers DNS services (coming at some point in the future)
2 Players:Heroku, DNS – Possibly ALIAS instead of CNAME
3 Players:Heroku, DNS, Redirection – Point root domain to redirection
server (zoneedit.com)
4 Players:Heroku, DNS, web server, HTML/PHP – Run a web server a have
a redirection inside an HMTL/PHP file.

The guys at wtfdns.com are working on a solution (2) that might solve
the problem. Apparently ALIAS is acting like an A record to the
outside world but as a CNAME internally. I'm not sure how exactly it
works so my explanation is probably too simplified. The outcome,
however, should be that it would solve the problem without violating
any RFC regulations and successfully recognizing all records.

Doesn't sound too bad so far?!

-JM

Myles Byrne

unread,
Jun 22, 2009, 10:58:44 PM6/22/09
to rails-...@googlegroups.com

On Tue, Jun 23, 2009 at 8:37 AM, Jean-Marie Schweizer <jeanmarie...@gmail.com> wrote:
> <?php set_header('Location', "http://www.myles.id.au" .
> $REQUEST['PATH_INFO'] + '?' + $REQUEST['QUERY_STRING']) ?>
> (or something simliar, I just made that up, haven't done PHP in a while)

Thanks Mike, that certainly is a way to solve it. Once I have a web
server I could also just simply use HTML redirection.

Mike appreciates your thanks. HTML redirection wouldn't keep the path, so for example: http://foo.com/bar would go to http://foo.com ... unless you could do something fancy with javascript.
 
However, that would kind of defeat the purpose of trying to reduce
complexity by moving from Slicehost to Heroku. I'm trying to reduce
the number of players if at all possible. So far, those are my
options.

1 Player: Heroku offers DNS services (coming at some point in the future)
2 Players:Heroku, DNS – Possibly ALIAS instead of CNAME
3 Players:Heroku, DNS, Redirection – Point root domain to redirection
server (zoneedit.com)
4 Players:Heroku, DNS, web server, HTML/PHP – Run a web server a have
a redirection inside an HMTL/PHP file.

The guys at wtfdns.com are working on a solution (2) that might solve
the problem. Apparently ALIAS is acting like an A record to the
outside world but as a CNAME internally. I'm not sure how exactly it
works so my explanation is probably too simplified. The outcome,
however, should be that it would solve the problem without violating
any RFC regulations and successfully recognizing all records.

Let us know how this goes. I've never heard of the ALAIS record type, and it's not on wikipedia's extensive list of record types either: http://en.wikipedia.org/wiki/List_of_DNS_record_types

Jean-Marie Schweizer

unread,
Jun 23, 2009, 1:39:19 AM6/23/09
to rails-...@googlegroups.com
> Mike appreciates your thanks. HTML redirection wouldn't keep the path, so
> for example: http://foo.com/bar would go to http://foo.com ... unless you
> could do something fancy with javascript.

Good point... Yeah for PHP then. :-)

> Let us know how this goes. I've never heard of the ALAIS record type, and
> it's not on wikipedia's extensive list of record types
> either: http://en.wikipedia.org/wiki/List_of_DNS_record_types

Hah, never get a break, do I? Well, we'll see what happens.

- JM

Matthew Winter

unread,
Jun 28, 2009, 5:38:17 PM6/28/09
to rails-...@googlegroups.com
Hi,

Godaddy offers a web redirection service of their own.

Setup the www cname to point to proxy.heroku.com
Then setup the redirection to www.domain.com

This will work, but any DNS changes after the redirection, causes the
redirection to break (or at least it does for me).

Then when you enter in domain.com, you are automatically redirected to www.domain.com
and so onto heroku.

The one problem with this solution is the length of time it takes to
resolve a request, far more than what you would want on a "large"
scale site.

Regards
Matthew Winter

Jean-Marie Schweizer

unread,
Jun 28, 2009, 5:54:19 PM6/28/09
to rails-...@googlegroups.com
Hi Matthew,

> Godaddy offers a web redirection service of their own.

But it doesn't support all top level domains, e.g. .ch domains.

I'm still waiting on the wtfdns.com guys to 'program' the ALIAS
solution. Otherwise I can go with zoneedit.com

Cheers,

Jean-Marie

Carl Woodward

unread,
Jun 28, 2009, 6:13:36 PM6/28/09
to rails-...@googlegroups.com

Lincoln Stoll

unread,
Jun 28, 2009, 6:18:38 PM6/28/09
to rails-...@googlegroups.com
This doesn't solve the mail delivery issues though - if you have a
cname and mx on the same record some mail servers will deliver mail to
where the cname points (i.e heroku), and not your mailservers.

Linc.

Carl Woodward

unread,
Jun 28, 2009, 6:40:16 PM6/28/09
to rails-...@googlegroups.com
Bugger.

Carl Woodward
0412218979
cjwoo...@gmail.com

Myles Byrne

unread,
Jun 29, 2009, 1:37:22 AM6/29/09
to rails-...@googlegroups.com
I like you Carl but if you ever reply with just a link to blog post that provides no new information I'm going to pour a glass of water down the back of your monitor.

Myles Byrne

unread,
Jun 29, 2009, 1:39:09 AM6/29/09
to rails-...@googlegroups.com
On Mon, Jun 29, 2009 at 7:38 AM, Matthew Winter <wint...@teratools.com> wrote:
The one problem with this solution is the length of time it takes to
resolve a request, far more than what you would want on a "large"
scale site.

Not sure what you mean here. You mean the time it takes to resolve the cname or the time it takes to follow the 301? Generally both are pretty fasted and usually cached.

Andrew Snow

unread,
Jun 29, 2009, 1:38:20 AM6/29/09
to rails-...@googlegroups.com

> On Mon, Jun 29, 2009 at 8:13 AM, Carl Woodward <cjwoo...@gmail.com

> http://blog.obiefernandez.com/content/2009/04/heroku-and-godaddy-cname.html


That link was the DNS equivalent of Google's non-closure of HTML tags
for "extra speed".. :-)

Carl Woodward

unread,
Jun 29, 2009, 2:14:20 AM6/29/09
to rails-...@googlegroups.com
Hahah,

Sorry I was just going through it this morning. Yes I didn't think.

Matthew Winter

unread,
Jun 30, 2009, 5:41:48 PM6/30/09
to rails-...@googlegroups.com
Hi,

I mean the initial time it would take for the resolve of the cname or a 301 for that matter. Basically before the DNS information is cached on your system

Have a look at this blog post:


It is amazing the length large scale sites will goto to shave off milliseconds from a request time.

My view is that using a "cname" approach would double the length of the initial resolve as 2 DNS requests need to be made. 1 to the initial domain.com and the 2nd to proxy.heroku.com.

Regards
Matthew Winter

Mike Bailey

unread,
Jul 5, 2009, 11:09:48 AM7/5/09
to rails-...@googlegroups.com
My view is that using a "cname" approach would double the length of the initial resolve as 2 DNS requests need to be made. 1 to the initial domain.com and the 2nd to proxy.heroku.com.

You're spot on.

When client and server are in the same country with ~20ms round trip time, this doesn't matter much. When packets are travelling halfway across the world, it can be significant (~220ms RTT).

Popular sites like Google figure most people will be getting cached DNS records from their ISPs resolvers. Less popular sites may see their DNS records expiring from the caches of ISPs.

I'm not sure how web proxies deal with HTTP 301's. That may be the biggest source of delay in using this method.

- Mike


Jean-Marie Schweizer

unread,
Aug 6, 2009, 6:09:07 AM8/6/09
to rails-...@googlegroups.com
Hi all,
Finally, after a very long time, I have more on this issue.

The guys at wtfdns.com have implemented the ALIAS record type which
took them a lot longer to implement than they initially predicted.
But, unfortunately although is works in certain situations it does not
with Heroku. The recommended setup with ALIAS would be

mydomain.com.  ALIAS   proxy.heroku.com.
mail CNAME ghs.google.com.
www  CNAME proxy.heroku.com.

But again, it doesn't work with Heroku. I merely mentioned it because
it might work in another instance and therefore be helpful.

However, I do have some good news about the issue being temporarily
addressed by Heroku themselves. See their response:

++++++++
"We've recently introduced support for A records for root domains only
so you should be able to add two A records for 75.101.163.44 and
75.101.145.87. If one changes then anytime that ip gets returned for
your domain the request will timeout.

We're currently forming a formal policy when we need to change or add
an ip to the ip pool."
++++++++

This will probably stand until they implement the DNS service which
will be a permanent solution but might cost something.

Cheers

JM

Reply all
Reply to author
Forward
0 new messages