Sometimes your test plans will point to DNS records that either aren't public or have specific IP addresses which you need to override.

You can achieve this by providing a .hosts file with your test plan. It doesn't matter what you call the file, as long as it has the extension .hosts for example, demo.hosts

In this file you can then specify an IP address to return for any host in the given domains. Queries in the domains are never forwarded and always replied to with the specified IP address which may be IPv4 or IPv6. You can also add wildcards/

For example, address=/#/ will always return for any query not answered from /etc/hosts or DHCP and not sent to an upstream nameserver. We use Google's nameservers for resolution and

One or more domains with no address returns a no-such-domain answer, so address=/ returns NXDOMAIN for and all its subdomains.

A more common example is just to override a specific subdomain, address=/ will return for

You can override multiple entries with multiple lines:

Did this answer your question?