Yes you can use aloe vera on your scalp as a mask. In general it works best when applied to your hair before your shampoo. Apply it to your roots and massage it gently to spread it everywhere on your scalp. You can leave it on your head for around 30 min to an hour then rinse it off with your usual washing routine. If you want to make your own aloe vera gel extract, make sure you check your Beginner's Guide to Homemade Haircare prepare it the right way!