Custom GitHub URL
Thursday, Jun 25, 2020


Do you often find yourself typing git clone I did.

In this tutorial, I will show you how I redirect from my custom domain to using Traefik.

For example, this allows me to easily access my websites GitHub repo,, located at by visiting


In my Traefiks main config I have a provider for Files:


        directory = "/etc/traefik/rules/"
        watch = true

Using a new file provider I created a simple middleware to redirect my custom domain to using Traefiks redirect regex.


    rule = "Host(``)"
    middlewares = ["github-redirect"]
    service = "empty-service"
        certResolver = "letsencrypt"


    regex = "*)"
    replacement = "${1}"
    permanent = true
comments powered by Disqus