In the bowl of a stand mixer, add the water, olive oil, yeast, sugar, and salt. Give it a quick stir and then add in 3 cups of your flour. Mix in.
In a medium skillet, melt the butter over medium heat. Add the onions and a sprinkle of salt to the skillet. Slowly saute the onions until golden brown and caramelized. Set aside.
Add in half of the onions and 2/3 of the chopped rosemary to the dough mixture. Switch to the dough hook attachment and run your mixer until the dough is no longer sticky and forms a ball. Add the remaining flour, a bit at a time, until this is achieved.
Spray a bowl with nonstick cooking spray (or coat with oil) and turn out dough. Cover with a towel and place in a warm place. Let rise for 2 hours, until the dough has doubled in size.
Heat your oven to 450F. Allow a dutch oven to preheat in the hot oven for 30 minutes.
Punch down the dough and flour a surface. Knead the dough for a few rotations and form it back into a ball. Place on a piece of parchment paper.
Transfer the paper and dough to the preheated dutch oven, cover. Bake for 25 minutes.
Top the bread with the remaining onions and rosemary; sprinkle cheese over top. Bake for an additional ten minutes, until the cheese is melted and browned. Remove from the oven and allow to cool for 10 minutes