# Cannot access subdomains

**URL:** https://community.traefik.io/t/cannot-access-subdomains/18140
**Category:** Traefik v2
**Tags:** docker
**Created:** [April 4, 2023, 4:03pm UTC](https://community.traefik.io/t/cannot-access-subdomains/18140 "2023-04-04T16:03:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![serkankster](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@serkankster](https://community.traefik.io/u/serkankster)
#### Post date: [April 4, 2023, 4:03pm UTC](https://community.traefik.io/t/cannot-access-subdomains/18140/1 "2023-04-04T16:03:03Z")

</div>

Hi, I am trying to set up my subdomains however for whatever reason i can only access my services from subdirectories ([domain.com/sonarr](http://domain.com/sonarr) instead of [sonarr.domain.com](http://sonarr.domain.com)).

This is how i set up my cloudflare settings

 ![image001](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/4/46090be712d4742b13895f824278ea5653dfe0ae.png)

and this is from my docker-compose.yml file

```auto
version: "3.9"
services:
  traefik:
    image: traefik:v2.9
    container_name: traefik
    restart: always
    environment:
      - CLOUDFLARE_EMAIL=${CLOUDFLARE_EMAIL}
      - CLOUDFLARE_DNS_API_TOKEN=${CLOUDFLARE_DNS_API_TOKEN}
      - CLOUDFLARE_ZONE_API_TOKEN=${CLOUDFLARE_ZONE_API_TOKEN}
      - LETS_ENCRYPT_EMAIL=${LETS_ENCRYPT_EMAIL}
    command:
      - --providers.docker=true
      - --providers.docker.exposedbydefault=false
      - --entrypoints.web.address=:80
      - --entrypoints.web-secure.address=:443
      - --entrypoints.web.http.redirections.entryPoint.to=web-secure
      - --entrypoints.web.http.redirections.entryPoint.scheme=https
      - --entrypoints.web.http.redirections.entrypoint.permanent=true
      - --certificatesresolvers.myresolver.acme.dnschallenge=true
      - --certificatesresolvers.myresolver.acme.dnschallenge.provider=cloudflare
      # Uncomment to test your configuration by using Let's Encrypt staging certificates
     #- --certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory
      - --certificatesresolvers.myresolver.acme.email=${LETS_ENCRYPT_EMAIL}
      - --certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./letsencrypt:/letsencrypt
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
  sonarr:
    image: lscr.io/linuxserver/sonarr
    container_name: sonarr
    environment:
      - PUID=${USER_ID}
      - PGID=${GROUP_ID}
    volumes:
      - ./sonarr:/config
      - ${DATA_ROOT}:/data
    restart: always
    labels:
      - traefik.enable=true
      - traefik.http.routers.sonarr.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/sonarr`) || PathPrefix(`/sonarr`))
      - traefik.http.routers.sonarr.tls=true
      - traefik.http.routers.sonarr.tls.certresolver=myresolver
      - traefik.http.services.sonarr.loadbalancer.server.port=8989

```

Wanted to get your suggestions. Subdirectories is fine for most services but jellyseerr has an issue in this setting that is blocking me from exposing that service which is why i am trying to understand what is wrong. I would really appreciate your help
