And you should. Not only can’t you put CNAME at the zone APEX without doing nasty tricks but not doing so is also a security risk when dealing with cookies.
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
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`.
It's not much different than using TLS for everything, but still handling and redirecting http:// traffic (also doing a 301 redirect).
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)
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.
> 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.
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.
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?
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.
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.
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.
e.g. _http._tcp.example.com and _https._tcp.example.com
It seems there was such a draft: https://tools.ietf.org/html/draft-andrews-http-srv-02
https://tools.ietf.org/html/draft-nygren-dnsop-svcb-httpssvc...
This one might have a larger chance of being accepted, since it provides some things which HTTP standard bodies and HTTP client vendors want. It doesn’t (at this stage, anyway) provide for the load-balancing “weight” field from the SRV record, but it does support MX-style priority numbers, and also port numbers. Very interesting, to say the least.
.AU, .NZ, .JP, .MX, .BR, .TH... it's not uncommon.
not suprising at all, I've seen e-mail address validation code that (among other things) used a fixed list of TLDs. I could imagine some spam filters doing a similiar thing.
(To wit: Deliver to it, and if it doesn't send, that's the user's problem)
Now more than ever. Before they opened the tld floodgates you could be pretty sure [word].[commonTld] could be put into your browser.
So yeah, guess we have to keep using those 4 letters or come up with alternative solutions. Funniest I've seen was an ad using http:// instead.
We also had a client who had to change their TLD from .healthcare to .org.uk because (a) people were confused because they didn't understand that there are all these new TLDs and kept adding .co.uk, .org etc and (b) some NHS systems in the UK (one of their target audiences) refused to accept emails that finished with .healthcare, saying that it was a malformed email address.
I think in the vast majority of cases these new TLDs aren't worth it until the general population's understanding catches up. I still advise clients to use www rather than a plain domain name for websites, because I've come across a significant minority of people who need that "www" as a clear signal that it's a website.