Finely chop 1-2 onions and blend them in a mixer with a tablespoon of coconut oil until smooth.
Transfer the onion paste and coconut oil mixture to a pot, stir well, and simmer on low heat for a few minutes until the paste turns golden brown.
Remove from heat and let the oil cool.
Strain the oil through a cotton cloth into a sealed container.
Optionally, add a few drops of essential oil to mask the onion scent. To use, massage the oil onto your hair and scalp, wait for 30 minutes before washing it off.