News for hackers. Stuff that matters.
Re:DNS: Basic Concepts (2013) by Abundnce10 on Wednesday June 08, 2016 @01:51PM (#11864102)
Almost always you'll want to redirect a bare domain like iskettlemanstillopen.com to www.iskettlemanstillopen.com. Registrars like Namecheap and DNSimple call this a URL Redirect. In Namecheap you would set up a URL Redirect like this...

I prefer my domains to be naked (as opposed to www.), but I typically redirect all www-traffic in my web server (NGINX). Is this the wrong approach?

Re:DNS: Basic Concepts (2013) by cmhamill on Wednesday June 08, 2016 @02:06PM (#11864214)
I'm partial to including the `www` prefix, but most of the reasons are aesthetic and not technical.

The summaries for each side:

http://www.yes-www.org

http://no-www.org

Re:DNS: Basic Concepts (2013) by eropple on Wednesday June 08, 2016 @02:26PM (#11864383)
Re:DNS: Basic Concepts (2013) by snuxoll on Wednesday June 08, 2016 @03:26PM (#11864883)
I prefer naked domains, but the problem I always have is that you can only use A records which makes using them with a bunch of things a pain in the butt. I host my personal website as just a tumblr blog (yes, go ahead and laugh, but I find it less of a chore to deal with than wordpress) so I need a CNAME to make that work, so I just have a very basic redirect on the naked domain to my blog subdomain.
Re:DNS: Basic Concepts (2013) by bschwindHN on Wednesday June 08, 2016 @09:41PM (#11867047)
Cloudflare offers something called CNAME flattening which will let you define a CNAME record for the naked domain.

https://blog.cloudflare.com/introducing-cname-flattening-rfc...

Re:DNS: Basic Concepts (2013) by prashnts on Wednesday June 08, 2016 @05:35PM (#11865871)
You can set an A record to 66.6.44.5 [0].

[0] https://www.tumblr.com/docs/en/blog_management#customdomain

Re:DNS: Basic Concepts (2013) by quacker on Wednesday June 08, 2016 @07:07PM (#11866412)
If it were me, I would set the ip (A record) on the root, and then use a CNAME to alias www to the root. Then you don't need any redirects, and you don't need to worry about server doing the redirects going down and taking your site with it.
Re:DNS: Basic Concepts (2013) by rubiquity on Wednesday June 08, 2016 @01:53PM (#11864119)
I've always done what you do. I feel like `www` is a subdomain that nobody ever wanted.
Re:DNS: Basic Concepts (2013) by foo123456 on Wednesday June 08, 2016 @02:04PM (#11864200)
well, using www for one lets you avoid buying a completely different domain to serve static content in a cookie-less fashion.
Re:DNS: Basic Concepts (2013) by Abundnce10 on Wednesday June 08, 2016 @02:17PM (#11864312)
I don't understand what you mean. Would you mind expanding on this?
Re:DNS: Basic Concepts (2013) by jordanlev on Wednesday June 08, 2016 @02:36PM (#11864462)
Every time you request something (a web page, an image, a css file, etc) from a server, your browser sends any cookie data that had previously been set by that server as part of the request header.

Cookies can be set for specific subdomains only, but if they are set for the "unprefixed" domain they will also be sent for all subdomains (just the nature of how browsers handle cookies).

Since cookie data is rarely needed just to server static assets (images, css files, etc), you can shave off some time on each request if you serve them from a subdomain that is different from the web page's subdomain... but of course your web page has to actually be at a subdomain (e.g. www.example.com) in order for this to work.

Hence, setting up your main web pages to be at a subdomain (such as www.) gives you the ability to then serve static assets from different subdomains without browsers having to send cookie data on each request.

Re:DNS: Basic Concepts (2013) by mxuribe on Wednesday June 08, 2016 @11:15PM (#11867333)
Nice explanation on this!
Re:DNS: Basic Concepts (2013) by zrail on Wednesday June 08, 2016 @02:36PM (#11864463)
Cookies are scoped to a domain name and all subdomains under that domain name. For example, if you set a cookie on `ycombinator.com` that cookie will be presented to `news.ycombinator.com` as well.

Using `www.example.com` as your cookied domain allows you to avoid sending your cookies to `cdn.example.com`, shaving off a few bytes of incoming bandwidth per request. Whereas if you use `example.com` as your cookied domain, those cookies will be passed to `cdn.example.com`. To avoid that, you'd have to set up your CDN on a completely different domain like `examplecdn.com`.

Re:DNS: Basic Concepts (2013) by mxuribe on Wednesday June 08, 2016 @11:15PM (#11867336)
Another nice explanation on this!
Re:DNS: Basic Concepts (2013) by zhte415 on Wednesday June 08, 2016 @02:10PM (#11864253)
It is surprising how many companies in technology and related spaces don't have any redirect to a bare domain name, and assume everyone types 'www.' before it. 404 simply exists without the www prefix.

That's serverside at least, whichi is easily remididied given simple education Much harder is the more than 70% of exotic browsers used by millions; I hate 2345 in particular.

Re:DNS: Basic Concepts (2013) by NeutronBoy on Thursday June 09, 2016 @03:47AM (#11868107)
I'm also considering my position on 'www', now that we have new GTLDs (I have been in favor of naked URLs).

nike.com is obviously a website

nike.shoes isn't - especially depending on the context.

At least www.nike.shoes is recognisable as a URL

Re:DNS: Basic Concepts (2013) by Siilwyn on Wednesday June 08, 2016 @02:01PM (#11864173)
I prefer naked domains as well since 'www' is a relic from the past.