Subaru overheats randomly

90 Sub Legacy, 110,000 miles overheats randomly. No leaks that we can see. Good around town, drive 60 miles on freeway, gauge pegs on off ramp. Hoses are hard. Replaced cap, thermostat, radiator good, fan comes on. Is there a way to KNOW FOR SURE that head gaskets are going? Could it be a hole in the exhaust into the water jacket? HELP