A rubber composition is based on at least one elastomer, a reinforcing filler, a crosslinking system and an optionally hydrogenated hydrocarbon-based resin, predominantly composed of units selected from the group consisting of cyclopentadiene, dicyclopentadiene, methylcyclopentadiene and mixtures thereof, said hydrocarbon-based resin having an average molecular weight Mz of less than 2000 g/mol and a glass transition temperature Tg, expressed in ° C., such that: Tg≥80−2*(% HA), wherein % HA represents the content of aromatic protons of said resin, the content of said hydrocarbon-based resin being within a range extending from 15 to 150 phr.