Yes, you can invest online in the primary market. For this, all you need to do is open a Demat account and a trading account with a SEBI-registered stock broker who offers an online trading platform.