Shares of online retailers fell Thursday after the U.S. Supreme Court ruled that states have the right to collect potentially billions of dollars in taxes from internet sales.

Overstock fell 5.7 percent, Etsy and eBay slipped more than 2 percent and Shopify declined 1 percent. Amazon was down nearly 1 percent.

Traditional retailers like Target, Walmart and Best Buy, meanwhile, saw shares rise about 1 percent or more after the decision.

The decision overturned a 1992 ruling that limited tax collection by retailers for online sales, regardless of whether or not a business maintains a physical presence in a state. The ruling is viewed as a win for those retailers that operate bigger businesses offline than online, yet have been forced to compete with e-commerce giants.

"Retailers have been waiting for this day for more than two decades," the National Retail Federation, an industry trade organization that has been a vocal proponent for equal sales tax rules, said in a statement following the ruling.

"The retail industry is changing, and the Supreme Court has acted correctly in recognizing that it's time for outdated sales tax policies to change as well," the NRF said. "This ruling clears the way for a fair and level playing field where all retailers compete under the same sales tax rules whether they sell merchandise online, in-store or both."



Still, retailers must now wait on Congress to follow the court's lead and pass legislation that would put new rules in place.

Only five states in the U.S. don't have a state-wide sales tax: Alaska, Delaware, Montana, New Hampshire and Oregon.

"Today's ruling will give every retailer the opportunity to compete on a level playing field without government's thumb on the scale — that's a win for all those who believe in free markets," Deborah White, general counsel for the Retail Industry Leaders Association, said in a statement.

"For the consumer, this means an increasing array of options both in-store and online, with competition for their business based on price, service, selection and value — not special tax treatment," White added.

Amazon already collects state sales taxes on products it sells directly or its so-called first party sales. But the company doesn't require sales tax collection on its third-party platform sales outside a handful of states. Previously, Amazon left it to third-party merchants on the platform to handle their own tax collection where applicable.

Some states have passed laws requiring online marketplaces to collect sales taxes on behalf of third-party sellers. On April 1, Pennsylvania became the second state, after Washington, where Amazon is instituting Marketplace Tax Collection for third-party sellers.

Some industry experts have argued mandatory sales tax collection laws by states for e-commerce may be positive for Amazon. Given the large number of jurisdictions and tax complexity, compliance costs can be substantial.

Amazon charges its third-party sellers a sales tax collection service for a 2.9 percent fee, so the company may actually benefit.

"The physical nexus standard hampered industry-wide competition and kept valuable tax revenues from local communities," said Tom McGee, president and CEO of the International Council of Shopping Centers. "We ... look forward to working with policymakers and business owners to find state-level legislative solutions which promote fairness and competition."

– CNBC's Tae Kim contributed to this report.