DNS configurations for dev environment: localhost wildcard matching
The goal of this blog post is to forward requests to *.local.zone
to 127.0.0.1
for local development purposes. local.zone
can be any domain in general.
Using /etc/hosts
A simple solution is to add entries in /etc/hosts
. This file overwrites the DNS resolving. Whatever is specified in this file, it will be automatically redirected to the corresponding IP address. For example, this is a default etc/hosts
:
127.0.0.1 localhost
255.255.255.255…