# Setting up HTTPS alongside existing config

**URL:** <https://community.traefik.io/t/setting-up-https-alongside-existing-config/12868>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [December 28, 2021, 3:01pm UTC](https://community.traefik.io/t/setting-up-https-alongside-existing-config/12868 "2021-12-28T15:01:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![selfhoster195](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/selfhoster195/32/4397_2.png) [@selfhoster195](https://community.traefik.io/u/selfhoster195)\
**Post date:** [December 28, 2021, 3:01pm UTC](https://community.traefik.io/t/setting-up-https-alongside-existing-config/12868/1 "2021-12-28T15:01:23Z")

</div>

Currently, I have traefik set up with the minimal config, including a custom `defaultRule`, that works very well inside my network.

Today, I discovered that my ISP no longer blocks inbound ports, so I want to set up HTTPS just for one container, with HTTP -\> HTTP redirect.

How do I do this while maintaining my existing domain names?

E.g. the container is available at `whoami.home.net`. I want it to be also available on `my-container.com`.

Currently, the container has no traefik labels.

I looked through the docs and labels such as this overwrites existing config?

```auto
traefik.http.routers.whoami.rule: (`my-container.com`)
traefik.http.routers.whoami.entrypoints: websecure
traefik.http.routers.whoami.tls.certresolver: myresolver

```

How do I go about this?

---

<div class="post-metadata">

**Author:** ![selfhoster195](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/selfhoster195/32/4397_2.png) [@selfhoster195](https://community.traefik.io/u/selfhoster195)\
**Post date:** [December 28, 2021, 5:49pm UTC](https://community.traefik.io/t/setting-up-https-alongside-existing-config/12868/2 "2021-12-28T17:49:08Z")

</div>

Arrived at this:

```auto
http:
  routers:
    mycontainer:
      rule: Host(`mycontainer.com`)
      service: whoami@docker
      entrypoints:
        - http
        - websecure
      middlewares:
        - to-https
      tls:
        certResolver: lets-encrypt
        domains:
          - mycontainer.com

  middlewares:
    to-https:
      redirectScheme:
        scheme: https
        permanent: true

```
