hostsman-portable icon indicating copy to clipboard operation
hostsman-portable copied to clipboard

Feature Request: Allow Duplicate Hostnames

Open jpotter23 opened this issue 2 years ago • 0 comments

Thanks for a great app. However here is one thing barring me from using it over editing my hosts file in notepad and that is the handling of duplicate hostnames.

I work in the webhosting field so I am constantly changing my hosts file entries for testing sites on servers other-than the server its currently pointed to in live DNS. However, to do this, effectively, I need to allow duplicate hostnames. like so:

192.168.10.10   server1 domain.tld www.domain.tld
192.168.10.20   server2 domain.tld www.domain.tld
192.168.10.30   server3 domain.tld www.domain.tld

I would then disable all lines but the server I am currently testing like so:

#192.168.10.10   server1 domain.tld www.domain.tld
#192.168.10.20   server2 domain.tld www.domain.tld
192.168.10.30   server3 domain.tld www.domain.tld

flush dns and test away

However, when I try to make these entries via the HostsMan built-in editor, they end up being sanitized of duplicates like so:

192.168.10.10   server1 domain.tld www.domain.tld
192.168.10.20   server2 
192.168.10.30   server3 

I can see no option to allow duplicate hostnames like this. So I am petitioning you for a preference setting that I can enable to allow duplicate hostnames so I can use your very well done built-in editor. Regardless if you take on this feature request or not. I thoroughly appreciate your efforts on making such an excellent feature rich tool like this.

Thanks for your time.

jpotter23 avatar Sep 22 '23 18:09 jpotter23