8 ms·
.test is an official IANA reserved special-use domain name that will never be delegated out. Use it. Problem solved. I don't know why people thought they could
by noinsight 9y ago
.test is an official IANA reserved special-use domain name that will never be delegated out. Use it. Problem solved.
I don't know why people thought they could start using random TLD's on their own, there was always the risk they could be delegated officially.
https://www.iana.org/assignments/special-use-domain-names/special-use-domain-names.xhtml https://www.iana.org/assignments/special-use-domain-names/sp...
- M4v3R 9y agoI always use .local when I have an app running on my machine locally. It's one of IANA's reserved special-use domains as well.
- okket 9y ago.local might be used for mDNS, mostly with Apple hardware.
- technion 9y agoAnd an issue most sysadmins would be familiar with unfortunately. For years, Microsoft's own guidelines suggested using .local for internal AD domains. Then one day, Apple started using it on mDNS, and Microsoft advice was suddenly "never use .local". But renaming an AD domain is painful and in many scenarios not supported at all, and people with domains more than a few years old are regularly pointed at Microsoft's recommendations and forced to explain the situation.
- snuxoll 9y agoAs far back as I can remember the domain creation wizard has yelled at you for using a non-delegated zone, .local was a stupid default they put into SBS and unfortunately it led them into a mess of saying “yes, this is OK” and “no, don’t do this” at the same time...
- quasse 9y agoUgh, our AD domain at work isn't even that old but was set up by some local consulting company and of course they used .local. It causes all sorts of grief when shared SMB drives won't resolve on linux, or you can't tell at first blush whether the DNS server is working properly or you just happen to have mDNS correctly resolving something for you on one machine (but not on another).
- hobarrera 9y ago> mostly with Apple hardware. And on BSD/Linux (with avahi). And on Phones. Actually, I think ONLY windows does not use this, though the mDNS implementation (bonjour) for windows uses that too.
- jopsen 9y agoAnd Linux... I haven't tried it, but supposedly you could host a .local site on your laptop and access it from your phone using the same wifi network.
- jnwatson 9y agoIt does work. I use it all the time.
- AndyMcConachie 9y agoYou really shouldn't do this. https://tools.ietf.org/html/rfc6762 https://tools.ietf.org/html/rfc6762
- edaemon 9y agoI looked through that trying to find why the parent commenter shouldn't use .local as they described, and it sounds like their use case is exactly what the RFC recommends. Can you explain why it's a bad idea?
- dunham 9y agoIf they're relying on a DNS server for resolution, they might not get the behavior they expect on an RFC compliant system. Any DNS query for a name ending with ".local." MUST be sent to the mDNS IPv4 link-local multicast address 224.0.0.251 (or its IPv6 equivalent FF02::FB).
- edaemon 9y agoThat's possible but it doesn't really seem like "really shouldn't do this" type of problem.
- eridius 9y ago.local is reserved for mDNS domain resolution (e.g. Bonjour). Don't use it for anything else.
- BillinghamJ 9y agoGoogle controls the .dev TLD. It has been delegated to them. They’re not using it randomly.
- darklajid 9y agoI feel you misunderstood the GP. Rewriting/expanding the statement using my words, this is what they said: "I don't know why people (developers) thought they could start using random TLDs for local/testing purposes". Yes, Google got the TLD and controls it now. The GP isn't criticizing Google (although I still think "we bought a TLD for internal use" is worth debating), they criticize people like the blog author for using 'random' (i.e. "not meant for that purpose") TLDs in their development process.
- deleted 9y ago[deleted]
- tomjen3 9y agoYes and no - if I add it to my dns system, then my computer should use that as a basis. That is the entire point of DNS. The problem here is that Chrome works around that system, which causes pains for others.
- icebraining 9y agoDNS was always a system for fetching information from SRI's NIC official master database. It was never supposed to be itself a source of truth for everything related to a domain.
- CydeWeys 9y agoYou shouldn't be locally rebinding domain names that exist on the global Internet. That is a recipe for disaster, as it makes your test suite and potentially even application logic dependent on your /etc/resolv.conf. It can cause spectacularly difficult-to-debug issues down the road as well as leaks of potentially confidential data (this is what ICANN's Controlled Interruption process was designed to mitigate). And you just can't expect other developers to have to change their DNS config just for tests to pass. The best practice for at least the past decade has been to either use subdomains of globally resolving domains that you own, or use one of the four testing TLDs specified in RFC 2606 that are guaranteed to never be delegated: https://tools.ietf.org/html/rfc2606 https://tools.ietf.org/html/rfc2606
- hamandcheese 9y agoPeople thought they could because, well, they can.
- CydeWeys 9y agoRight up until they can't. Better to use things that are guaranteed to work, not just things that work now by happenstance but are not guaranteed to continue working in the future.
- cesarb 9y ago> I don't know why people thought they could start using random TLD's on their own, there was always the risk they could be delegated officially. For a long time, the set of non-country TLDs was mostly static, and country TLDs were always exactly two characters. The risk was always there, but it looked like it was only a theoretical risk, until recently the floodgates opened and nearly every TLD became fair game.
- snuxoll 9y agoPeople still use .local in this day and age, I’m so freaking tired of editing my avahi-daemon config to not spend 10 seconds resolving internal resources.
- hobarrera 9y agoUsing .local is just asking for trouble -- avahi/bonjour/mdns have used that pseudo-TLD for ages. Using that locally is a great recipe for things breaking.
- schoen 9y agoIn fact, Apple officially registered it for this purpose in order to avoid this kind of conflict. These conflicts with manually-assigned .local names were already happening since the beginning of Apple's zeroconf work, and other people were frustrated with them (you can see on Wikipedia that Microsoft had previously advocated manual use of .local in its documentation). But the designation has been official since 2013. Edit: This was all described in another part of this thread already, sorry for the pure duplication.
- CydeWeys 9y ago"Recently" being relative of course. The big gTLD expansion was first announced in 2008 when the application process for new gTLDs started being worked on. There's been plenty of time to fix things, but as usual, people will delay and only fix things when they break. Hence ICANN's Controlled Interruption process.
- adrian17 9y ago> I don't know why people thought they could start using random TLD's on their own, there was always the risk they could be delegated officially. If a company has its own internal network with its own DNS, does it still need to conform to ICANN's name assignments? I thought it doesn't...?
- mzzter 9y agoChrome as a browser doesn't follow internal name assignments. Running in a sandbox won't fix the issue that Chrome will redirect perceived TLDs to HTTPS.
- CydeWeys 9y agoChromium is open source. You could always compile a version with your desired HSTS preload list, if you wished. Probably better to just use real globally delegated domain names though.
- ge0rg 9y agoThere is no "DNS police" entity to force them, but just using a random domain will cause issues if that domain ever gets registered. First, you will begin leaking internal data by means of DNS requests, server connections, maybe even internal emails - e.g. when a client attempts to connect to the intranet outside of VPN. Second, you obviously won't be able to communicate with the new owners of that domain.
- CydeWeys 9y agoYou're free to do whatever you want on your local network. If you have collisions with resources on the global Internet, however, and you local network is connected to the Internet, them you're setting yourself up for problems. Hence why it's a best practice to not do that.
- xg15 9y agoExcept for things like this issue, where you'd be affected when using Chrome or Firefox - even if your local network were completely disconnected from the internet.
- manojlds 9y agoAnd the article already mentions .test?
- abritinthebay 9y ago.dev was specifically championed by... someone in the Ruby community I think... like 6-7 years ago. It stuck, annoyingly, like a misinformed fad that won’t go away. I agree btw - .test or .local - anything else is just asking for problems
- matharmin 9y agoOne big usability issue with .test domains is that it doesn't work well with Chrome's address bar. If I type "my.test", it tries to do a Google search for it. "my.dev" on the other hand tries to connect to my local http service. This is a stupid problem to complain about, but typing out the full "http://my.test" http://my.test" every time just becomes annoying. Does anyone have a solution for this?
- matharmin 9y agoJust found the workaround: add a slash at the end of the URL, e.g. "my.test/". Not ideal, but not as bad as typing "http://" http://" every time.
- adamwathan 9y agoThe annoying part about using .test, .localhost, .invalid, etc. is that Chrome still treats "my-project.localhost" as a search instead of doing a DNS lookup. Need to add a trailing slash or specify the protocol, which honestly is just annoying enough that I'd rather risk collisions and use a TLD Chrome recognizes like .dev.