WASHINGTON—Silicon Valley technology firms, worried about their ability to bring foreign workers to the U.S. under President Donald Trump, are distancing themselves from Indian outsourcing firms, which are heavy users of the same visa program that U.S. tech firms rely on.

U.S. tech companies hope that any new restrictions on the H-1B visa program, which provides visas for highly skilled foreign workers, will be directed at the Indian firms and that U.S. tech companies can escape with more minimal changes to their practices.

...