News for hackers. Stuff that matters.
Re:Subdomain Me - add www with an A record by achew22 on Tuesday January 04, 2011 @05:26PM (#2068801)
It is really not a good idea to let your naked record go to a 3rd party. If you need your root to be an A name, go with a DNS provider that will do URL redirects. If you trust them with DNS resolution of your domain you can trust them to not go crazy with your root record.

EDIT: If you are looking for a host that will do this, http://NameCheap.com is how I do it but I understand GoDaddy and Hover does it too. Seriously... go with a reputable registrar that has these simple features it will pay off in the end.

Re:Subdomain Me - add www with an A record by awormus on Tuesday January 04, 2011 @08:52PM (#2069463)
I agree with this 100% If anyone wants to implement something like this on a server which you have control over, here is the mod_rewrite line which enables this "service":

RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L]

Re:Subdomain Me - add www with an A record by bradleyjoyce on Tuesday January 04, 2011 @05:34PM (#2068840)
when I saw someone retweet about this service in my stream it was a bit confusing... can't really see the purpose myself, when you, as you mention, you can handle this within the confines of your own registrar.

I'm curious as to why the developer felt the need to make this.

Re:Subdomain Me - add www with an A record by awormus on Tuesday January 04, 2011 @08:46PM (#2069449)
I wrote this "service" and the answer to why I did it is three-fold. 1. I had used 2 services, blogger and shopify, which didn't support pointing naked domain names. 2. It took all of 10 minutes and 3. I somehow landed on an epic domain name.

The long answer is that I run a platform for high-availability sites. I don't want to manage the client's DNS and I want to have the flexibility to instantly move sites from server to server. The answer, is to setup a CNAME and have the clients point their primary CNAME (www) to a host where you control the DNS.

www.example.com CNAME to example.myhostingservice.com. example.myhostingservice.com would then either point to an IP address or a round-robin DNS setup.

That leaves the problem of the naked domain. Traditionally you'd point the naked domain to the Primary IP address and then do some httpd.conf magic to redirect the naked to the www (or vice versa). However this does not solve the problem of what happens if the underlying IP address changes.

Pointing the naked domain to a dedicated IP address which is not associated with where the site is hosted removes the problem of what would happen if you change IPs quickly.

Re:Subdomain Me - add www with an A record by bradleyjoyce on Tuesday January 04, 2011 @09:05PM (#2069500)
Interesting, thanks for the response!
Re:Subdomain Me - add www with an A record by falseflags on Tuesday January 04, 2011 @05:29PM (#2068814)
This is pretty much the greatest setup for a mass-lemonpartying known to man.
Re:Subdomain Me - add www with an A record by jamuraa on Tuesday January 04, 2011 @06:19PM (#2069005)
That's weird, I usually go the other way - I redirect the www to the naked domain.
Re:Subdomain Me - add www with an A record by storborg on Tuesday January 04, 2011 @07:01PM (#2069150)
I may be wrong here, but I think there's one good reason to use anything.example.com instead of example.com: with the naked domain, you can't have a separate domain for static assets which the client doesn't send the cookie to (for performance improvement). If you set a cookie with the domain example.com, it will still get sent to static.example.com.

Granted, you could use examplecdn.com or something, but then you have to register and manage more domains.

Re:Subdomain Me - add www with an A record by apgwoz on Tuesday January 04, 2011 @07:08PM (#2069180)
Isn't that what the domain portion of the set-cookie header is for?
Re:Subdomain Me - add www with an A record by seabee on Tuesday January 04, 2011 @07:32PM (#2069244)
It gets propagated to subdomains, it doesn't restrict it to just the domain specified.
Re:Subdomain Me - add www with an A record by apgwoz on Tuesday January 04, 2011 @08:24PM (#2069394)
Yes, it gets propogated to subdomains, but the point was that if you have subdomain X.y.z, as long as you set the cookie for y.z, the cookie is valid for X.y.z and U.y.z.
Re:Subdomain Me - add www with an A record by storborg on Tuesday January 04, 2011 @08:30PM (#2069404)
My point was that you don't want the cookie to be sent to other subdomains, so you'd actually want to set the domain to X.y.z. You can't do that if you're web domain is y.z.
Re:Subdomain Me - add www with an A record by calloc on Tuesday January 04, 2011 @06:44PM (#2069072)
Google AppEngine does not support naked domains unfortunately.

At least, that is what I use it for myself.

Re:Subdomain Me - add www with an A record by trafficlight on Tuesday January 04, 2011 @06:44PM (#2069071)
That's the way it should be. It's a shame the www convention took hold.
Re:Subdomain Me - add www with an A record by bauchidgw on Tuesday January 04, 2011 @07:29PM (#2069237)
only reason www is usefull is because common cms (forums, blogs, comments, ....) convert www.example.com to a clickable link, but example.com not. yeah stupidbutthats the way it is.....
Re:Subdomain Me - add www with an A record by twir on Tuesday January 04, 2011 @06:06PM (#2068967)
Forgive my ignorance, but when is this useful?

Don't most self-respecting DNS providers allow you to do this?

Re:Subdomain Me - add www with an A record by vinhboy on Tuesday January 04, 2011 @05:21PM (#2068780)
If you have Godaddy, they allow you to forward your domain to www for free. I do that with my GAE apps.
Re:Subdomain Me - add www with an A record by amoore on Tuesday January 04, 2011 @05:46PM (#2068885)
Thanks, I didn't realize that. I've been using godaddy for eons and have looked for this feature on their confusing site before. I'll look again.
Re:Subdomain Me - add www with an A record by Lewisham on Tuesday January 04, 2011 @06:21PM (#2069011)
Let me know when you find out how to do it. I have my www. subdomain pointing to Google Sites, and I'd love for the naked domain to go there too.
Re:Subdomain Me - add www with an A record by vinhboy on Wednesday January 05, 2011 @01:47AM (#2070197)
Seriously? you guys can't find it?

Here it is: http://imagesk.com/QnEp4RU8.png

Re:Subdomain Me - add www with an A record by turbodog on Tuesday January 04, 2011 @07:42PM (#2069274)
Godaddy-specific instructions here: http://help.godaddy.com/article/422
Re:Subdomain Me - add www with an A record by Fileformat on Wednesday January 05, 2011 @12:00AM (#2069981)
No, these are for a one domain to another, not a domain to a subdomain of itself
Re:Subdomain Me - add www with an A record by vinhboy on Tuesday January 04, 2011 @05:53PM (#2068915)
I thought their last UI was bad, but their latest UI, with all the spinning and zooming boxes, is even worse.
Re:Subdomain Me - add www with an A record by bugsy on Tuesday January 04, 2011 @07:24PM (#2069224)
What the website advocates, redirecting site traffic through them, is a very bad idea. If you don't know why this might be so, stop and ask yourself why you are in charge of modifying the zone records.
Re:Subdomain Me - add www with an A record by makethetick on Tuesday January 04, 2011 @06:55PM (#2069124)
It's a pretty clever idea, I've come across loads of sites that have a naked domain but no www.

As clever as it is though, it serves no real world purpose, anyone clever enough to setup up their own domain will be able to set up a www subdomain, be it dns level or using a 301 redirect.

Re:Subdomain Me - add www with an A record by gcr on Tuesday January 04, 2011 @09:49PM (#2069620)
I go with enom. They allow wildcard subdomains, so I just ask nginx to 301-redirect the .www to the root

  server {
    listen       80 default;
    server_name  your_domain.net;
    rewrite   ^  http://www.your_domain.net$request_uri? permanent;
  }
Re:Subdomain Me - add www with an A record by Fileformat on Tuesday January 04, 2011 @11:57PM (#2069969)
I did this too (redirect2www.com/74.53.18.72). So easy I'm surprised no one at Google/etc has done it with a slick IP address like they did for DNS.
Re:Subdomain Me - add www with an A record by upinsmoke on Tuesday January 04, 2011 @05:19PM (#2068770)
Works with Google App Engine?
Re:Subdomain Me - add www with an A record by TomasSedovic on Tuesday January 04, 2011 @06:10PM (#2068978)
Yes. This works on the DNS level, so it doesn't matter what technology your site uses.

But as others pointed out, decent DNS registrars will let you do this in your DNS administration account. Which is much safer.