I want to prepare a Youtube course on how to create websites. Will I get rewards for imparting knowledge even if non-Muslims get benefit from it? And will I get any sins if a student I taught creates a website with Haram content?
As far as your students are from general public who can use the knowledge in good way, and you do not know for sure that they will misuse it in unlawful ways, you are permitted to teach them and give them your skill. If you are sure that a specific group of people will use the skill in unlawful work, then you should refrain from helping them to do unlawful work.
'Wassalam.