How to Setup your own Medium custom domain

2 min readJan 13, 2021


As you know, Medium have stopped support setup custom domain for Medium users for years. This topic will help you a trick to bypass the limit.


Use reversed proxy to forward request from custom domain to Medium page

Very basically, we can use any reversed proxy to forward any request from custom domain to Medium page destination.


I’m a big fan of Heroku, so I prefer solution which can deploy to Heroku. So, I decided to write an Flask application to work as reversed proxy.

A very simple code in python to run a reversed proxy

In fact, I have a small problem when run reversed proxy to Medium page. In the Medium features, it run like mobile application, this make there are many javascript event installed on the page and the page will be 500 error if use click to read on reversed proxy page. Fortunately, I found a solution to remove the listener event. And now, pages after reversed seem work smoothly.


For the installation, please follow the guide on my repo

Basically, there 3 steps:

  • Setup application to Heroku
  • Customize Heroku domain
  • Add domain to Cloudflare if you need https


In my demo, I have setup my domain point to my Medium




I'm a developer working in cyber security. My regularly IDE is MS Word.