If you use the SQLHOSTS registry key on the local computer, for all database servers, the correct SQLHOSTS registry key must exist on all computers involved in replication. In addition, the hosts and services files on each computer must include information about all database servers.
For example, to set up replication between the server instance srv1 on the computer host1 and the server instance srv2 on host2, you must ensure the following: