Western hats before the Stetson?

The Stetson came out in 1865, I think. So what did a cowboy wear before that? A Kansas City dude might have worn a derby. I figure the SW guys wore sombreros but I can’t picture those in Deadwood.

Deadwood didn’t exist until 1876, so they could have worn Stetson style hats or derbys. Many styles were modeled after civil war issue army hats.

Bowlers. Bat Masterson, Billy the Kid, Butch Cassidy all wore bowlers (derbies.)

Cowboy style hats were an evolution of the hats worn on southern farms and plantations. Here’s a pretty good rendering. Note that the boss is wearing something that can best be described as a Rhett Butler hat - which itself looks a lot like the slouch hats worn by the Army before and during the Civil War. The slaves are wearing narrow-brim hats.

Generally, the more your occupation kept you outdoors, the wider the brim on your hat. Basic practicalities. A faro dealer doesn’t need sun and rain protection. A vaquero does. You can see the range here.

The Ten Gallon Hat is actually a Sombrero with the side brims turned up, and then with the peak of the hat depressed it becamesthe commonly seen ‘Cowboy Hat’. These were popularized in the movies, photographs show a variety of other styles were common, often with the front brim turned up.

Otherwise known as the Corporal Agarn.

Conversely, the firm convention amongst the graziers of the bunyip aristocracy on this side of the puddle is the larger the farm you own, the smaller the hat you wear. A stock & station agent might wear a Stetson at the sale yards. His clientele will not.

On their 18th birthday Gramps bought each of his grandsons a suitable hat.
Always a classic Trilby

No. Bat Masterson was a bit of a city dandy, so yes, but what they wore were broad brimmed felt hats. The one known photo of Billy is a large black kinda shapeless felt hat of some sort. There is another maybe of him playing a game with what could be a bowler- maybe.

Yes, cowboys loved to come into town, dress up, and get their pictures taken in fancy city clothes. That is where the iconic picture of Butch and Sundance comes from.

But period pictures and writings make it clear that they wore wide brimmed hats- sometimes straw, sometimes sombreros, etc:
https://truewestmagazine.com/the-100-best-historical-photos-of-the-american-cowboy/

Take a look at the picture captioned “circa 1885 cabinet card of Slaughter’s cowboys is the best group photo of real working frontier cowboys.” Wide brimmed hats: not yet "cowboy hats " as we think of them, but sort of a ur-cowboy hat.

Mark Twain wrote about those sorts of hats. So did Teddy, in fact Teddy went so far as to state anyone caught in a bowler would have it taken off his head and tossed around- if not shot. (the hat, not the head).

Now some idiot found a bunch of pictures of cowboys posing in dudified city clothes with bowlers, found out that the iconic Stetson didnt come in until the late 19th century, and wrote a article that cowboys wore bowlers. Ten minutes of looking at period photos or reading period literature would have disabused them of their wrongness, but why let facts get into the way of a good article? That piece of garbage has gone around the internet quite a bit, even being quoted by QI, the BBC quiz show.

It was 1865 when Stetson introduced their “Boss of the Plains” model. The rest is history – there’s even been a book written about this particular hat.

Cattle drives had their history; another history to consider was the California gold rush. Knowing no better, the easterners in search of quick and easy money just wore whatever they had worn back east, and that was usually bowler hats for headwear. Their other clothes were destroyed by the rigors of mining and panning and prospecting. Enterprising tailors tried to make and sell more durable clothes and it took 21 years for one of them, Jacob Davis, to combine denim cloth and rivets to make blue jeans (He partnered with Levi Strauss to mass produce them). But as far as hats, bowlers dominated for a good while in California.

Not out in the mines or herding cattle.
I googled “early california 49ers gold miners” out of 50 guys wearing hats (mostly slouch hats) one guy had a bowler, one guy had what looked like a top hat! But almost all wore widebrimmed felt hats, aka slouch hats".

Also, the Bowler was only invented in 1849. I doubt it became so popular, so quick to play a major part in the 1849 gold rush.