[GH-ISSUE #18] Multiple hosts per line added on Windows causes problems #8

Closed
opened 2026-03-02 05:08:04 +03:00 by kerem · 3 comments
Owner

Originally created by @tomjn on GitHub (Mar 23, 2021).
Original GitHub issue: https://github.com/goodhosts/hostsfile/issues/18

I had users reporting that sites they were using would not load with 16 host entries on a line.

Further research indicates that Windows has an upper limit of 9 alias' per entry

#17 attempts to fix this

Originally created by @tomjn on GitHub (Mar 23, 2021). Original GitHub issue: https://github.com/goodhosts/hostsfile/issues/18 I had users reporting that sites they were using would not load with 16 host entries on a line. Further research indicates that Windows has an upper limit of 9 alias' per entry #17 attempts to fix this
kerem closed this issue 2026-03-02 05:08:04 +03:00
Author
Owner

@tomjn commented on GitHub (Aug 12, 2021):

@luthermonson do you have any idea why this is happening? I can see that there is code that attempts to implement this, but it is non-functional. I have users opening notepad.exe as administrators to fix this issue manually because goodhosts adds too many hosts on the same file when using the vagrant-goodhost plugin

<!-- gh-comment-id:897252676 --> @tomjn commented on GitHub (Aug 12, 2021): @luthermonson do you have any idea why this is happening? I can see that there is code that attempts to implement this, but it is non-functional. I have users opening notepad.exe as administrators to fix this issue manually because goodhosts adds too many hosts on the same file when using the `vagrant-goodhost` plugin
Author
Owner

@gbraad commented on GitHub (Sep 9, 2021):

Will try to propose a fix. Seems this issue has been open for quite some time.

A post-process might be a possible workaround? You can try Windows Host File Optimizer or a powershell script for this.

<!-- gh-comment-id:915973697 --> @gbraad commented on GitHub (Sep 9, 2021): Will try to propose a fix. Seems this issue has been open for quite some time. A post-process might be a possible workaround? You can try Windows Host File Optimizer or a powershell script for this.
Author
Owner

@tomjn commented on GitHub (Sep 9, 2021):

@gbraad see https://github.com/goodhosts/hostsfile/pull/17#discussion_r687281993 I think that's what needs to happen

<!-- gh-comment-id:915988232 --> @tomjn commented on GitHub (Sep 9, 2021): @gbraad see https://github.com/goodhosts/hostsfile/pull/17#discussion_r687281993 I think that's what needs to happen
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hostsfile#8
No description provided.