# Redirect cloud.domain.com to other host

**URL:** <https://community.traefik.io/t/redirect-cloud-domain-com-to-other-host/4586>\
**Category:** Traefik v2\
**Tags:** docker, file, tcp\
**Created:** [February 24, 2020, 10:13am UTC](https://community.traefik.io/t/redirect-cloud-domain-com-to-other-host/4586 "2020-02-24T10:13:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![supayoshi](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@supayoshi](https://community.traefik.io/u/supayoshi)\
**Post date:** [February 24, 2020, 10:13am UTC](https://community.traefik.io/t/redirect-cloud-domain-com-to-other-host/4586/1 "2020-02-24T10:13:38Z")

</div>

Hi, quite new to Traefik, migrated V1 to V2 yesterday, that went good.  
However I have 1 public IP, and traefik is now running on port 80 and 443.

But I have another server running Nextcloud, on another internal IP.  
Now I'd like Traefik to catch the traffic going to [cloud.domain.com](http://cloud.domain.com) and forward it to that host omn the internal network.

What would be the best way to implement this?  
I've been going through the docs, and a loadbalancer looks like the right option,  
specifying the server but I cannot get it to work so far...

The traefik currently runs a few docker containers, and these work great.  
Not sure if I should go for a file or tcp thing, but please advice.

Please help

---

<div class="post-metadata">

**Author:** ![simplecto](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/simplecto/32/1639_2.png) [@simplecto](https://community.traefik.io/u/simplecto)\
**Post date:** [February 24, 2020, 11:00am UTC](https://community.traefik.io/t/redirect-cloud-domain-com-to-other-host/4586/2 "2020-02-24T11:00:32Z")

</div>

Can you post your config? That is usually a good first step in debugging things

---

<div class="post-metadata">

**Author:** ![supayoshi](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@supayoshi](https://community.traefik.io/u/supayoshi)\
**Post date:** [February 24, 2020, 1:59pm UTC](https://community.traefik.io/t/redirect-cloud-domain-com-to-other-host/4586/3 "2020-02-24T13:59:14Z")

</div>

Currently I have no config to do this, I am a bit fussed about what I should use to achieve this, a router, something else or idk?

---

<div class="post-metadata">

**Author:** ![supayoshi](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@supayoshi](https://community.traefik.io/u/supayoshi)\
**Post date:** [February 25, 2020, 9:07am UTC](https://community.traefik.io/t/redirect-cloud-domain-com-to-other-host/4586/4 "2020-02-25T09:07:13Z")

</div>

Hi there,

Config:

**traefik.yml**

```auto
api:
  dashboard: true

entryPoints:
  http:
    address: ":80"
  https:
    address: ":443"

providers:
  docker:
    endpoint: "unix:///var/run/docker.sock"
    exposedByDefault: false
  file:
    directory: traefik_dynamic
certificatesResolvers:
  http:
    acme:
      email: contact@arwingship.nl
      storage: acme.json
      httpChallenge:
        entryPoint: http

```

**traefik\_nextcloud.yml inside directory traefic\_dynamic:**

```auto
http:

  routers:
    # Define a connection between requests and services
    to-nextcloud:
      entrypoints:
      - http
      - https
      rule: "Host(`cloud.iwally.nl`)"
      tls:
        certResolver: http
       # If the rule matches, applies the middleware
      # If the rule matches, forward to the whoami service (declared below)
      service: nextcloud

  services:
    nextcloud:
      loadBalancer:
        servers:
          - url: "http://10.15.1.10:80"

```

---

<div class="post-metadata">

**Author:** ![supayoshi](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@supayoshi](https://community.traefik.io/u/supayoshi)\
**Post date:** [February 25, 2020, 6:53pm UTC](https://community.traefik.io/t/redirect-cloud-domain-com-to-other-host/4586/5 "2020-02-25T18:53:59Z")

</div>

currently I keep getting error, 404 page not found

---

<div class="post-metadata">

**Author:** ![supayoshi](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@supayoshi](https://community.traefik.io/u/supayoshi)\
**Post date:** [February 25, 2020, 11:47pm UTC](https://community.traefik.io/t/redirect-cloud-domain-com-to-other-host/4586/6 "2020-02-25T23:47:36Z")

</div>

This was fixed, I needed to enable, insecureSkipVerify: true  
as traefik did not see the signed certificate as valid (letsencrypt)
