As coronavirus spreads globally and cases rise in the United States, private businesses are assessing their level of risk. No one wants one of their employees to bring the contagious new illness into the workplace and cause dozens of infections.

In addition to health officials’ warnings to avoid countries hit hard by the virus, several companies have implemented travel restrictions: Amazon and Twitter, among other major corporations, have asked their employees to postpone nonessential business travel. (Amazon chief executive Jeff Bezos owns The Washington Post.)

Other companies are halting travel to specific countries, while some are asking employees to cancel personal trips.

It might be frustrating to have to change your plans. It could be even more unnerving if your employer says you can’t return to the office for 14 days — the suspected maximum amount of time before an infected person shows symptoms — if you travel to a highly infected area.

Do I actually have to go along with my employer’s travel restrictions?

You probably do have to abide by your employer’s travel guidelines if you have an at-will employment agreement and want to keep your job, according to New York-based employment lawyer Davida Perry. Most people have this type of arrangement, which means the company can fire you for any reason, including for refusing to cancel your vacation.

If you’re covered by a union or have an individual contract with your employer, you have additional protections. The specific safeguards depend on your agreement, said Washington-based employment lawyer Heidi Burakiewicz.

State and local employment laws also come into play, Burakiewicz said, so anyone thinking about canceling travel should discuss their circumstances with an attorney. Consultations often are free.

An important caveat to all of this: No matter what the rules are, companies can’t enforce them in a discriminatory way. Travel restrictions have to be applied evenly across the board and can’t target members of any specific group, Perry and Burakiewicz said.

Who pays if I have to cancel my vacation?

Perry and Burakiewicz said the bad news is that, absent specific guidelines in a contract or a collective bargaining agreement, your employer has no obligation to compensate you if you are told to cancel a trip. The good news is that your airline, hotel or cruise line might be willing to waive cancellation or rebooking fees because of the public health crisis.

Of course, employers could always perform an act of goodwill. Howard Markel, a University of Michigan professor who wrote a book about an 1892 epidemic, said companies should consider reimbursing employees for travel plans they cancel at firms’ requests.

Can my employer force me to self-quarantine?

The answer again depends on the conditions of your employment, but the answer for most people is yes. Perry said that although it’s unlikely a member of your company’s human resources department is going to come to your house to check that you’re there, an employer’s quarantine is governed by an honor system.

Beyond the potential impact on your employment, it’s in the public interest for you to stay home if you might be carrying the coronavirus. The virus is contagious and can particularly harm older adults and people with preexisting conditions.

“We don’t live in isolation,” Perry said. “I think that there are some ethical and moral underpinnings here about what you do, what choice you make and what impact that could have.”

When it comes to compensation, Burakiewicz said your employer has to pay you if you work from home while self-quarantined. If you can’t work remotely, Burakiewicz said the business must let you use any paid sick leave that you’ve accrued.

The Family and Medical Leave Act might also apply and would give you up to 12 weeks of leave, Burakiewicz said. The law requires only unpaid leave, but paid leave is available in certain circumstances.

What does it actually mean to self-quarantine?

An effective self-quarantine entails staying completely at home because there’s a chance you could have the virus. You don’t go to work, shop for groceries or do anything else that requires you to leave your house. Ideally, Markel said, your family members should also stay home because they’ve had close contact with you.

If this sounds inconvenient, that’s because it is. And it can be nearly impossible for many people, including those who have to pick up children from school or care for aging parents. Markel said governments at all levels need to implement plans to meet self-quarantined residents’ basic needs, like food for children who get free breakfasts and lunches from their schools and otherwise might not eat.

“You can’t just self-quarantine and leave those people like it’s 1890,” Markel said. “It’s morally and technically wrong, but it’s also unsustainable.”