The Qur'an mentions two types of prostration: (a) prostration as a form of worship and obedience (whether it be literal, as in during prayer; or figurative), and (b) prostration for reasons other than worship (for instance, in some cultures, it was/is a gesture of respect).
Qur'an 2:34, 17:16, and 20:116 say that Allah ordered Shaytan (Iblis) to prostrate to Adam. It literally says "to Adam", and I see no reason why it shouldn't be taken at face value rather than looking for a sideways interpretation. Obviously, Allah is not commanding Shaytan to worship Adam but rather it is a gesture of humility and an acknowledgment of the potential of the human being to ascend higher than the angels. It may also have been a test for Shaytan to prove his inner nature because, up until then, he had been seen as an excellent worshipper.
(Maybe it was also a gesture of service, in that some of the angels, who were also ordered to prostrate to Adam, are assigned to serve people - for instance, in recording the deeds of people. Some people also hold it was out of reverence for the position of the Prophet Muhammad and his Ahl al-Bayt who would be born from Adam.)
Anyway, all of this appears to have occurred outside the earthly realm. Some also say that "Adam" here refers to humanity as an archetype as a whole, as existing outside this world, and not the living, breathing human being. So, while we picture this as Shaytan getting onto his hands and knees and performing what we consider to be sajda to Adam as a human being, it may have been somewhat different. So for this reason also, it isn't really worthwhile to differentiate between "sajda to" or "sajda in front of".
The Qur'an does not specifically say that sajda is only for Allah. Instead, it says that everything in the heavens and earth already does sadja to Allah, willingly or unwillingly (13:52, etc.). This can be taken to mean literal sajda as well as metaphorical. That is, all created beings are compelled to follow the divine decree and no created being can decide it is outside of Allah's control. Most creations willingly worship Allah, although human beings have the free will to worship Allah or other things (and we have the free will to perform sajda to Allah or not perform sajda to Allah). For this reason, the Qur'an tells people not to do sadja to the sun and the moon, and instead tells people to do sajda to Allah who is the creator of the sun and the moon.
However, according to Islamic law, it is not permissible for human beings to do sadja to other Allah. This is derived from Qur'an and hadith.