News for hackers. Stuff that matters.
Re:Benchmarking DNS response times of TLDs by SiVal on Friday January 10, 2020 @06:53AM (#22010336)
Could you (or someone) explain this? (I'm not arguing, I'm interested.)
Re:Benchmarking DNS response times of TLDs by johannes1234321 on Friday January 10, 2020 @07:57AM (#22010599)
There is lots on the DNS already. For the security argument: Consider you run on `example.com` and at a later stage add `[blog|forum|support|...].example.com` suddenly cookies from `example.com` might leak to those Subdomains. If you put cookies on `www.example.com` they won't leak to those.
Re:Benchmarking DNS response times of TLDs by Avamander on Friday January 10, 2020 @10:09AM (#22011441)
Not if you set the Domain attribute of the cookie properly, this is a poor software problem, not second-level domain problem.
Re:Benchmarking DNS response times of TLDs by johannes1234321 on Friday January 10, 2020 @11:01AM (#22011859)
True, but simple mitigations can be powerful ...

Sidenote: If leaking cookies to your own subdomains is a risk, one might also have other problems already. Point is: I explained the potential risk. Evaluating one has to do oneself

Re:Benchmarking DNS response times of TLDs by Eikon on Friday January 10, 2020 @07:02AM (#22010377)
You can only put CNAME records at the zone APEX if there is no other records kinds as a CNAME is supposed to be a synonymous.

If you had records such as:

@ IN A 127.0.0.1

@ IN CNAME example.org.

The server could not answer anything sensible as you now just introduced an ambiguity.

The "nasty tricks" I was referring to is basically records such as ALIAS that you may find at some providers. The way they work is roughly:

- Given a record `@ IN ALIAS example.org.`.

- Pull records at `example.org` (maybe with an AXFR request but usually just individual records).

- Merge our domain APEX with `example.org` records we just pulled.

- Reply to requester with the merged zone, discarding the ALIAS record.

Regarding cookies, the issue is that they are passed to subdomains so cookies that you set for `example.org` are also accessible from `*.example.org`.

Re:Benchmarking DNS response times of TLDs by 867-5309 on Friday January 10, 2020 @07:36AM (#22010502)
unless I am hosting separate sites/IPs on subdomains, or have a complex cookie situation, I think the www. prefix seems vestigial/legacy and completely unneeded. I am actually in the opposite camp of not including it at all and redirecting to non-www. it sounds awfully ambiguous in speech ("double-u double-u double-u dot", "all the double-us dot", "dub dub dub dot", etc.) and most times multiplies the syllabic length of a "catchy" address. I even had an older client who said "stop" instead of "dot", and another who used @www. in an email address. I also think it looks silly and unprofessional on business cards, on the side of vans, etc., especially when http:// and/or a trailing fowardslash is also included cringe. if it MUST exist, DNS does not always have to be involved, it could just be a simple http 301 forward or vhost config. we don't add :80 or :443 to the end of a web address. let the browser handle all that.
Re:Benchmarking DNS response times of TLDs by gregmac on Friday January 10, 2020 @08:48AM (#22010863)
It's worth making it exist and doing a 301 redirect. There's some people that will still type it, and others that will link it without checking, and they'll just think your site is broken. You're fighting against the grain for what's essentially a couple lines of config.

It's not much different than using TLS for everything, but still handling and redirecting http:// traffic (also doing a 301 redirect).

Re:Benchmarking DNS response times of TLDs by toast0 on Friday January 10, 2020 @11:50AM (#22012289)
It's also useful to set hsts for the whole domain.

I'm opinionated enough to say if you type http://example.org/foo, I'm just going to redirect that to https://www.example.org/ but reasonable people could disagree (especially since Chrome has been going back and forth on displaying the actual URL and something that's vaguely similar to it)

Re:Benchmarking DNS response times of TLDs by otterlicious on Saturday January 11, 2020 @03:26PM (#22022064)
That would just be a giant middle finger to people who manually type URLs.
Re:Benchmarking DNS response times of TLDs by slig on Friday January 10, 2020 @08:14AM (#22010689)
Now that Chrome is hiding the "www." it's going to look more and more legacy. I still use the "www." and probably will continue using, but for business cards and things like that I always use the bare domain.
Re:Benchmarking DNS response times of TLDs by svacko on Friday January 10, 2020 @09:40AM (#22011196)
The article https://bjornjohansen.no/www-or-not (2017) persuaded me to still use www, however, opinions vary:

* https://www.yes-www.org/why-use-www/

* https://dropwww.com/why

Re:Benchmarking DNS response times of TLDs by frereubu on Friday January 10, 2020 @08:56AM (#22010904)
It depends on your audience, but setting it up just so you don't cringe could well be alienating a bunch of your potential user base. Seems like a strange trade-off.

I think people here often forget that there's a mass of people out there who are nowhere near as technically literate and wouldn't have the faintest idea of what "DNS" stands for.

Re:Benchmarking DNS response times of TLDs by cbg0 on Friday January 10, 2020 @07:18AM (#22010435)
What's so "nasty" about using ALIAS?

> Regarding cookies, the issue is that they are passed to subdomains so cookies that you set for `example.org` are also accessible from `*.example.org`.

This is only true for cookies that are not set as `HostOnly` as far as I'm aware.

Re:Benchmarking DNS response times of TLDs by belorn on Friday January 10, 2020 @08:09AM (#22010661)
> What's so "nasty" about using ALIAS?

The DNS server provide implements this differently, but the two "common" methods I know of is either aggressive caching or caching on request. In both cases the server becomes the client, breaks geoip, and create complexity where errors can easily slip in.

Re:Benchmarking DNS response times of TLDs by chrisweekly on Friday January 10, 2020 @07:44AM (#22010544)
Re: "... only true for cookies that are not set as 'HostOnly'"

Technically, you're right -- but that implies a commitment to vigilance in setting that attribute on every instance of every cookie across every page or endpoint on your apex domain. Further, if you ever want to support some use of a subdomain, you have to deal with the ability of any page therein to set cookies on ".example.com". And when you inevitably miss any instance of any of these, you're unlikely to notice, because everything will still function normally. So in practice, using the apex paints you into a corner and makes the domain less useful.

There's also the issue of DDOS attacks and related problems, for which the fastest and simplest mitigation is updating DNS entries for your CNAME(s). Why take that option off the table?

Re:Benchmarking DNS response times of TLDs by Eikon on Friday January 10, 2020 @07:22AM (#22010450)
> What's so "nasty" about using ALIAS?

It's a not standard and therefore, is not a generally applicable solution.

When something not standard becomes common practice and is expected, here comes the pain.

Re:Benchmarking DNS response times of TLDs by cbg0 on Friday January 10, 2020 @07:56AM (#22010598)
> When something not standard becomes common practice and is expected, here comes the pain.

I think that's the case with most popular features before they become a standard. Personally, I've used ALIAS on AWS without a hitch for years.

Re:Benchmarking DNS response times of TLDs by SteveNuts on Friday January 10, 2020 @07:58AM (#22010603)
The standard should be amended for the modern web then. AWS's (and I'm sure many other's) implementation of this for their various load balancing, CDN services, etc. are critical to the health of the web now.
Re:Benchmarking DNS response times of TLDs by XelNika on Friday January 10, 2020 @07:47AM (#22010562)
I don't really see the issue. It changes nothing from the DNS client's perspective.
Re:Benchmarking DNS response times of TLDs by toast0 on Friday January 10, 2020 @11:58AM (#22012371)
From the DNS client's perspective, there is a positive and a negative.

Positive: since the server with an alias record actually returns an A/AAAA, a client doesn't have to contact any more servers to get the results.

Negative: the servers for the CNAME target may be faster, relevant if the name is used beyond the A/AAAA TTL but sooner than the TTL would be set for a CNAME); or the servers for the target may be providing much finer targeting than is possibly by proxying.

Re:Benchmarking DNS response times of TLDs by omnimus on Friday January 10, 2020 @03:36PM (#22015239)
Noob question: Lets say i am fine with all going to www. or other subdomains mainly because i like using cname to point to other server. I still need to set some Apex record no? if A is blank i dont have anything to do the redirect to www. or what i am missing? Thank you!
Re:Benchmarking DNS response times of TLDs by jedberg on Friday January 10, 2020 @05:06PM (#22016127)
Yes, you still need an apex record with an actual IP address. And ideally something listening at that IP address that will redirect to the www address on both http and https.
Re:Benchmarking DNS response times of TLDs by jbverschoor on Friday January 10, 2020 @07:38AM (#22010512)
ALIAS is not a valid record.
Re:Benchmarking DNS response times of TLDs by faeyanpiraat on Friday January 10, 2020 @06:59AM (#22010359)
I'm interested in this aswell.