In most cases, assortments and ordering gaskets is the most logical method of replacement as already mentioned. Unfortunately, occasionally, there will always be that one you just can not find.
In those cases, I machine rubber gaskets from "Rubber bumper feet" and " Rubber tapered plugs" typically found at the local hardware store.
Machining rubber requires certain considerations along with proper tooling and procedures.
To make a long story short, I will explain the following procedure to machine a example gasket as follows. Further info if requested.
(1) First, the OD of the Gasket is machined per first photo.
(2) Then using a .015" wide cutoff blade, I plunge twice into the ID of the gasket making a .030" wide groove per first photo.
(3) I then position the the cutoff blade to machine the thickness of the gasket and plunge to the ID depth. The example is about .010" thick. Second photo.
(4) At this point with the tip of the cutoff blade at ID depth, I move the blade to the right about .020" and it will part the bottom of the gasket off to proper ID. Thus the reason for the initial .030" wide groove, to allow the gasket to move into that space unobstructed while the ID is being parted.
(5) The gasket can then be lifted out of the cavity with a tweezers per third photo and the end result fourth photo.
Once familiar with machining rubber, This is less than a five minute job. All dimensions of a gasket are controlled by hand wheel settings within about .001" as with any machining process
Jerry Kieffer