# How do I set up traefik virtual based hosting for traefik V2?

**URL:** <https://community.traefik.io/t/how-do-i-set-up-traefik-virtual-based-hosting-for-traefik-v2/7649>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [September 11, 2020, 5:12pm UTC](https://community.traefik.io/t/how-do-i-set-up-traefik-virtual-based-hosting-for-traefik-v2/7649 "2020-09-11T17:12:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidF](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@DavidF](https://community.traefik.io/u/DavidF)\
**Post date:** [September 11, 2020, 5:12pm UTC](https://community.traefik.io/t/how-do-i-set-up-traefik-virtual-based-hosting-for-traefik-v2/7649/1 "2020-09-11T17:12:40Z")

</div>

I am using Traefik in a Docker-Compose set-up. I recently saw that multiple websites (all owned by one person) are mirroring my website and showing up higher in google results.

I found two links on Stack exchange sites discussing what to do.  
[First Link](https://stackoverflow.com/questions/6666719/how-do-i-stop-other-domains-from-pointing-to-my-domain)  
[Second Link](https://webmasters.stackexchange.com/questions/68345/another-website-is-mirroring-and-ranks-above-my-site-in-search-results)  
One of the first steps seems to be to set up virtual "name-based hosting" or "name-based virtual hosting" or something similarly named.  
Can someone explain how to do this in the docker-compose file as well as the traefik.yml file?  
I really hope to prevent this sort of thing from happening as it appears to be a game of a whack-a-mole!

---

<div class="post-metadata">

**Author:** ![zespri](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/zespri/32/310_2.png) [@zespri](https://community.traefik.io/u/zespri)\
**Post date:** [September 11, 2020, 10:13pm UTC](https://community.traefik.io/t/how-do-i-set-up-traefik-virtual-based-hosting-for-traefik-v2/7649/2 "2020-09-11T22:13:50Z")

</div>

With traefik that happens naturally if you are using specific host names in your router configuration. It will only save you from dumb proxying, where the proxy does not care to substitute a host header, or dns pointing to your IP, and won't help in any other case.
