# Location Detection in Shopware 5

**URL:** https://forum.shopware.com/t/location-detection-in-shopware-5/90607
**Category:** Shopware 5
**Tags:** programming
**Created:** [29. September 2021 um 11:53 UTC](https://forum.shopware.com/t/location-detection-in-shopware-5/90607 "2021-09-29T11:53:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![peter0601](https://avatars.discourse-cdn.com/v4/letter/p/dfb087/32.png) [@peter0601](https://forum.shopware.com/u/peter0601)
#### Post date: [29. September 2021 um 11:53 UTC](https://forum.shopware.com/t/location-detection-in-shopware-5/90607/1 "2021-09-29T11:53:42Z")

</div>

Hallo zusammen,

ich bin auf der Suche nach der Möglichkeit per IP location detection den Benutzer in einen entsprechenden Ländershop weiterzuleiten. Bspw. Benutzer kommt aus Österreich und soll daher auf `www.meinshop.de/at` geleitet werden.

Kennt jemand ein Plugin oder eine einfache Lösung dieses Theme zu implementieren?

=======================================================

Does anyone know an easy to implement solution how to forward users from certain countries into a dedicated subshop. E.g. the user is located in Austria, therefore if accessing the shop system one will directly forwarded to `www.meinshop.de/at`

Grüße / Regards  
Peter

---

<div class="post-metadata">

### Author: ![phil](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/phil/32/13661_2.png) [@phil](https://forum.shopware.com/u/phil)
#### Post date: [29. September 2021 um 18:54 UTC](https://forum.shopware.com/t/location-detection-in-shopware-5/90607/2 "2021-09-29T18:54:41Z")

</div>

Wenn Du auf keine externen Services zurückgreifen willst/kannst (z.B. wegen GDPR aka DSGVO), schau Dir mal [PHP: GeoIP - Manual](https://www.php.net/manual/en/book.geoip.php) an (User Post ganz unten) - musst Du dann halt selbst einbauen.

LG Phil

---

<div class="post-metadata">

### Author: ![NextMike](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@NextMike](https://forum.shopware.com/u/NextMike)
#### Post date: [30. September 2021 um 08:07 UTC](https://forum.shopware.com/t/location-detection-in-shopware-5/90607/3 "2021-09-30T08:07:56Z")

</div>

Du könntest es auch ggf. über den Hoster lösen. Stichwort mod\_geoip

---

<div class="post-metadata">

### Author: ![peter0601](https://avatars.discourse-cdn.com/v4/letter/p/dfb087/32.png) [@peter0601](https://forum.shopware.com/u/peter0601)
#### Post date: [30. September 2021 um 09:06 UTC](https://forum.shopware.com/t/location-detection-in-shopware-5/90607/4 "2021-09-30T09:06:21Z")

</div>

Hallo @phil und @NextMike ,  
danke für eure Hinweise. Ich hatte gehofft, dass ein Plugin verfügbar wäre, dass ich bisher noch nicht gefunden habe. Für Shopware 6 scheint es hier ja dedizierte Lösungen zu geben.  
Wir gehen nun den Weg das selbst zu implementieren mit GeoLite2 Free Geolocation Data.  
Danke für eure Mithilfe und den Support.

Gruß  
Peter
