Connectors specific to one protocol are a relatively modern thing. In the old days connectors were made by connector manufacturers and then equipment makers bought them and used them as they saw fit. Even today this is the norm for more niche protocols. It's extremely common for the same connector to be used for many incompatible application.
This is a very good thing for retro computing folks, as it means that even long after a system or protocol is obsolete the connectors are generally still readily available.
To reduce the chance of incorrect mating, it was possible to buy variants of female connectors with a hole blocked off and variants of male connectors with a pin missing. For low volume, you could get plugs to fill the holes in female connectors and for male connectors you could pull the unwanted pin out with pliers.
With IDE, a missing/blocked pin was sometimes used as a key to prevent reverse mating with connectors that did not have a shell. However cable manufacturers were not consistent, some cables had the hole blocked, others did not. Apparently controller manufacturers weren't consistent either, with some of them using connectors with all 40 pins present.
Then ATA-66 came along. They needed to improve signal integrity and the way they decided to do it was with custom connectors*. On the mating side, this is the same as a traditional IDE connector. On the cable side the number of wires is doubled. ThisThe introduction of special connectors for IDE lead to a much higher level of consistency in the market.
I've always known the style of connector used for older versions of IDE as an "40 way IDC connector". Unfortunately, my experiance with buying connectors is that while many manufacturers make compatible connectors, they all use different names for things, so searching by name is often futile.
What I find does work is going to the website of a supplier, finding the relevant category, using the parametrics to narrow down the selection and then looking through the pictures to find what I want. Be aware that a single picture is often used for a range of components, so it's a good idea to take a quick look at the datasheet when you have found what you think you want, and conversely you should not be put off if the picture shows a different pin count from what you are looking for.
So in this case, I went to Mouser and did a search for "IDC connector", a quick look at the results told me that the relavent category was "headers and wire housings", so I went to that category narrowed down by number of positions (40), pitch (2.54mm), number of rows (2), row spacing (2.54mm) and termination style (IDC). I then sorted by price and the first result was what I was looking for with over 7 thousand in stock.
https://www.mouser.co.uk/ProductDetail/Wurth-Elektronik/61204023021?qs=PhR8RmCirEZ46uWaDWskDw%3D%3D
Fitting IDC connectors to ribbon cables is not too difficult. There are special tools, but honestly i've found a normal vise works just as well.
* The motherboard, master and slave connectors for 80 wire cables all being slightly different, to support cable select and to allow the controller to detect that an ATA-66 cable was in use.