People wearing protective masks use hand sanitizer while sitting in Union Square in San Francisco, California, U.S., on Wednesday, March 4, 2020.

EBay has stepped up its efforts to prevent price gouging by banning all face masks and hand sanitizers from its site.

The company sent a notice to sellers Thursday that said it's blocking new listings for hand sanitizer, disinfecting wipes and surgical masks, including N95 and N100 masks, "effectively immediately."

The decision, which only applies to U.S. listings, was made due to concerns that inflated prices for these products could be in violation of price gouging laws. California Attorney General Xavier Becerra on Wednesday issued an alert to consumers reminding them of the state's price gouging laws and other states have similar approaches to price gouging. Issuing a blanket ban was viewed as a more comprehensive solution to the problem, rather than enforcing a price gouging cap on individual items, eBay said.

It comes after CNBC previously found listings offering hand sanitizer and face masks at inflated prices. For example, a 20-pack of Gerson 1730 face masks was priced at $148, while a pack of five 2.5-ounce Germ-X hand sanitizer bottles cost $500. The listings were removed after CNBC asked eBay about them.