You need to use handwraps. It's just common sense. And by the sounds of it, it doesn't sound like you actually train in boxing or anything else. You just punching a bag without the correct training is quite pointless actually. Unless you just look at it like a physical activity and want to train. But you won't learn anything.
Never use bare hands on a heavy bag. You get a bunch of calcium deposits on your knuckles and have arthritic hands. Save the bare hands when and if you have to fight in a self defense scenario.
Though it can "condition" your hands, it's not wise. Like Brain F mentioned, you may end up damaging your hands in the long run.
Also some bags, depending on material, with end up scratching your hands and knuckles.
Use handwraps
I have boxing gloves but I also use just barefists on the heavy bag at times to give myself some preparation and conditioning in case I have to punch in a self defense scenario without gloves. Any advice on punching barefisted on the heavy bag? Thanks.