asalam hello I intend to sell books and other product on the internet and I guess my customers (buyers) would be non muslims . so is it permissible to sell to them because their money may come from unlawful sources like alcohol ,riba,gambling or other haram things ,and is permissible to sell in amazon kindle because there are unlawful ebooks that speak about erotic things and other unlawful products there and images .An what about advertising in a website or magazine or newspaper where for example unlawful things are displayed there and besides that for example in a newspaper you may find a dating area including in the website of the newspaper .
All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
There is no harm in engaging in buying and selling transactions with non-Muslims within what is lawful. The possibility that something that someone among them possesses was acquired from something forbidden, such as alcohol or Riba, has no affect on the transaction. The evidence for this is that the Prophet, sallallaahu ‘alayhi wa sallam, engaged in buying and selling transactions with Jews even though they traded in Riba, wine and the like. For more benefit, please refer to Fataawa 84460 and 86619.
Similarly, it is permissible in principle to sell books through a site that specializes in selling e-books even if the site also sells forbidden books.
Also, it is permissible to advertise on a site or in a newspaper, and just because the site or newspaper contains some matters that either violate or are forbidden in the religion does not mean that advertising in them is prohibited, as long as the transactions you engage with them in are lawful.
Allaah Knows best.
You can search for fatwa through many choices