top | item 2068655

Subdomain Me - add www with an A record

17 points| bradleyjoyce | 15 years ago |subdomain.me | reply

29 comments

order
[+] achew22|15 years ago|reply
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.

[+] awormus|15 years ago|reply
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]

[+] bradleyjoyce|15 years ago|reply
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.

[+] falseflags|15 years ago|reply
This is pretty much the greatest setup for a mass-lemonpartying known to man.
[+] jamuraa|15 years ago|reply
That's weird, I usually go the other way - I redirect the www to the naked domain.
[+] storborg|15 years ago|reply
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.

[+] calloc|15 years ago|reply
Google AppEngine does not support naked domains unfortunately.

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

[+] trafficlight|15 years ago|reply
That's the way it should be. It's a shame the www convention took hold.
[+] bauchidgw|15 years ago|reply
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.....
[+] twir|15 years ago|reply
Forgive my ignorance, but when is this useful?

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

[+] vinhboy|15 years ago|reply
If you have Godaddy, they allow you to forward your domain to www for free. I do that with my GAE apps.
[+] amoore|15 years ago|reply
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.
[+] bugsy|15 years ago|reply
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.
[+] makethetick|15 years ago|reply
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.

[+] gcr|15 years ago|reply
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;
  }
[+] Fileformat|15 years ago|reply
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.
[+] upinsmoke|15 years ago|reply
Works with Google App Engine?
[+] TomasSedovic|15 years ago|reply
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.