The hosts file on Windows computers is used to bind certain name strings to specific IP addresses to override other name resolution methods.
Often, one decides to change the hosts file, and discovers that the changes refuse to take effect, or that even old entries of the hosts file are ignored thereafter. A number of "gotcha" mistakes can cause this, and it can be frustrating to figure out which one.
When faced with the problem of Windows ignoring a hosts file, what is a comprehensive troubleshoot protocol that may be followed?
This question has duplicates on SO, such as HOSTS file being ignored
However, these tend to deal with a specific case, and once whatever mistake the OP made is found out, the discussion is over. If you don't happen to have made the same error, such a discussion isn't very useful. So I thought it would be more helpful to have a general protocol for resolving all hosts-related issues that would cover all cases.