# Multiple domains but only one with SSL?

**URL:** https://community.traefik.io/t/multiple-domains-but-only-one-with-ssl/22159
**Category:** Traefik v2
**Tags:** docker
**Created:** [April 5, 2024, 8:11pm UTC](https://community.traefik.io/t/multiple-domains-but-only-one-with-ssl/22159 "2024-04-05T20:11:54Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![nickshanks347](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/nickshanks347/32/8510_2.png) [@nickshanks347](https://community.traefik.io/u/nickshanks347)
#### Post date: [April 5, 2024, 8:11pm UTC](https://community.traefik.io/t/multiple-domains-but-only-one-with-ssl/22159/1 "2024-04-05T20:11:54Z")

</div>

Take this simple container:

```auto
  whoami:
    image: traefik/whoami
    container_name: whoami
    networks:
       - frontend
    labels:
       - "traefik.enable=true"
       - "traefik.http.routers.whoami.entrypoints=websecure"
       - "traefik.http.routers.whoami.rule=Host(`whoami.example.com`)"
       - "traefik.http.routers.whoami.tls=true"
       - "traefik.http.routers.whoami.tls.certresolver=le-https"

```

This will reverse proxy [whoami.example.com](http://whoami.example.com) to the whoami container with a SSL certificate from Lets Encrypt. Now, how would you add another domain but does not request a certificate through Lets Encrypt?

So 2 domains, one with SSL cert from LE, one without. Just a case of adding another router to the labels? A lot of duplicate config like that, any more efficient way of doing it?

---

<div class="post-metadata">

### Author: ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)
#### Post date: [April 6, 2024, 11:02am UTC](https://community.traefik.io/t/multiple-domains-but-only-one-with-ssl/22159/2 "2024-04-06T11:02:50Z")

</div>

This should work, but you can’t enable http-to-https redirection on web `entrypoint`:

```auto
  whoami-insecure:
    image: traefik/whoami
    container_name: whoami-insecure
    networks:
       - frontend
    labels:
       - "traefik.enable=true"
       - "traefik.http.routers.whoami.entrypoints=web"
       - "traefik.http.routers.whoami.rule=Host(`whoami-insecure.example.com`)"

```
