To set up a custom domain on Medium, send an email to customdomains@medium.com with your publication URL and your custom domain or subdomain URL.
We’ll respond with the following 12 A records that you’ll add to your domain or subdomain (you need to create a separate A record for each IP):
A records:
52.0.16.118
52.1.119.170
52.1.147.205
52.1.173.203
52.4.145.119
52.4.175.111
52.4.225.124
52.4.240.221
52.4.38.70
52.5.181.79
52.6.3.192
52.6.46.142
We’ll also provide you with a CNAME that has a domain and a target. You’ll add this to your DNS records. This allows us to buy an SSL certificate for your domain or subdomain. It’s important that the CNAME’s domain side has the long string plus either .domain.com or .subdomain.domain.com.
All registrars look a little bit different, so it might take a minute to figure out how to get yours to work.
This screenshot is what correct DNS records should look like:

Please note, www.yourdomain.com with the “www” prefix will not work by default. If you’d like to have visitors be able to use the “www” prefix in addition to using your domain or subdomain directly, you will have to create a new CNAME record with a domain/host/name of “www” (no quotes) and a target/points to/value of the domain or subdomain you will be using: ie, "www.yourdomain.com" (without quotes).