Implement mDNS for DDEV Name Resolution

TYPO3’s most common local development environment is the open-source DDEV project.

DDEV uses docker and docker-compose to put up a website on your local computer, but your browser has to be able to resolve the hostname used to reach it. For example, if your site is named “mytypo3”, the browser is going to have to look up “mytypo3.ddev.site” via your machine’s name resolution techniques to get to it.

DDEV currently provides two ways for the browser to do this:

  • Names like *.ddev.site work great, and that’s the default. They get looked up in DNS automatically, but only if DNS is working, and only for simple names like “mytypo3.ddev.site”, not for other TLDs like “mytypo3.some.dev.com”. It also doesn’t work if you’re offline.
  • Other names (like the example “mytypo3.some.dev.com” can be automatically added to the computer’s hosts file, but the process is clunky and it usually requires sudo privileges.

Another technique for name resolution that can help in this situation is mDNS. mDNS is a local-network name-resolution technique built into both Windows and macOS, and easily added to Linux. It allows projects named “*.local” to be looked up automatically, without hosts-file editing, and with no network connection.

Our proposal is to add mDNS support as a new technique for name resolution in DDEV. See the DDEV Issue. Thanks for your support!

5 Likes

Which budget do you need for your idea?
10.000 Euro

1 Like

Hey @rfay

we use another tool chain in our company, but we have the same “problem”. The internal dev domains are also resolved via online DNS to 127.0.0.1. In our situation many homeoffice Fritz-router has a rebind protection that do not allow an external DNS to resolve a domain to 127.0.0.1.

Our solution was a dnsmasq (with 2-3 lines configuration) installed via JAMF to resolve the domains locally. In our use case the dnsmasq solution was easier to integrate to solve the problem directly on all company macbooks instead an integration into the development chain itself. Do you check also dnsmasq for your usecase? Or is it important for you to integrate it directly into DDEV?

Regards,
Tim

Hi Tim! Your Fritzbox problem is easy to resolve, see docs at Troubleshooting - DDEV Docs

But dnsmasq is a great solution, and we recommend it to advanced users, but we avoid solutions that require changes to the computer itself, or that require advanced administration. Also remember that DDEV works on many operating systems and environments, so dnsmasq isn’t easy in all of those.

We would be integrating mDNS directly into DDEV.

2 Likes