GeoIP Redirect - Country Redirect, Language by Country and Geo Redirect for Website
by Modvanta https://modvantaapps.tech/odoo-apps/geoip-redirect/$ 19.94

GeoIP Redirect for the Odoo 19 Website
Send every visitor to the right language, store or URL from their country - with Odoo's own GeoIP database, no paid service needed. Country picker pop-up, visitor country badge, search engine exemption and a cookie that respects the visitor's own choice.
Written and supported by Modvanta - modvantaapps@gmail.com
Odoo 19 Community and EnterpriseUses Odoo GeoIP (GeoLite2)Optional geolocation APIMulti-websiteSEO safe: crawlers never redirected21 automated tests
What it does
In plain language Odoo 19 can already tell which country a visitor comes from (GeoIP), but it does nothing with it on the website: everybody lands on the same language and the same site. This module adds country rules: visitors from these countries switch to this language, go to that website, go to this URL, or stay where they are. Visitors from a country without a rule get a small pop-up to pick their country, or follow a default rule. Once a visitor picks a language or a country by hand, the module never redirects them again. | Who it is for Companies with one Odoo website in several languages that want each country to land in its own language. Groups with one Odoo website per country or region (multi-website). Shops that send some countries to a different store, distributor or landing page. Anyone who must keep search engines able to index every language version. |
Key features
Every screenshot below was taken on Odoo 19 with this module installed.
FEATURE 1
What it adds over Odoo 19
Odoo 19 detects the visitor country but never redirects on it. The module adds:
Country rules per website: switch language, send to another website, send to a URL, or stay
A default rule for all other countries, or a country picker pop-up
A visitor country badge and an option to hide the language selector
Never redirects crawlers, employees, checkout, payment and portal pages
Redirect on the first page of a visit, or on every page; the visitor's own choice always wins
An optional geolocation API as fallback, with a log of every answer

FEATURE 2
A German visitor lands on the German site
A visitor from Germany opening /contactus is sent to /de/contactus with a temporary 302 redirect. The page they asked for is kept, with its query string.
The badge shows the detected country and lets the visitor change it
Redirected only once per visit by default, so they can still switch to English

FEATURE 3
Country picker for everybody else
A visitor from a country with no rule gets a pop-up with the countries you serve. Their pick is remembered for 30 days and sends them to the right language or store at once.
Closing the pop-up keeps the visitor where they are
Switch the pop-up off and use a default rule instead

FEATURE 4
Country redirect rules
One line per group of countries, ordered by priority, for one website or all of them, with the number of redirects each rule made.
A country can be in only one rule per website
Rules for one website win over rules for all websites

FEATURE 5
Language, website or URL
Choose what happens: switch language, go to another Odoo website (same page or home), go to an absolute URL or a path on this site, or stay. 302 or 301.
Keep the page: /shop/desk goes to the same page on the target
No redirect loops: a visitor already on the target stays there

FEATURE 6
Geolocation API fallback
Odoo's GeoIP database is used first. For IPs it does not know you can add a web service (any JSON API that takes the IP in the URL). Each answer is kept for a day.
Test button, call counts for today, failures
One active API per website

FEATURE 7
Every API answer logged
IP, country, HTTP status, time taken and error of each API call, grouped per day, as a list, pivot or graph. Logs older than 90 days are removed automatically.

How it works
| 1 | Install Install the module and open Website -> Configuration -> Settings -> GeoIP Redirect. Switch it on. |
| 2 | Add your languages For language rules, add the languages to the website first (Settings -> Languages). |
| 3 | Create rules Website -> Configuration -> GeoIP Redirect -> Country Redirect Rules: pick countries and what should happen. |
| 4 | Test from the office Type an IP of the country to test in Local Test IP (for example 85.214.132.117 for Germany) and open your site from your own network. Public visitors are not affected. |
Settings
| GeoIP Redirect | On or off per website |
| Redirect | First page of a visit only (recommended) or every page until the visitor picks a country |
| Country Picker Pop-up | For countries without a rule and without a default rule |
| Show Visitor Country / Hide Language Selector | Badge with the detected country; hide Odoo's language selector |
| Never Redirect Search Engines | With an editable crawler pattern |
| Never Redirect These Paths | Checkout, payment, portal, backend and login by default; one prefix per line |
| Do Not Redirect Employees / Local Test IP | Testing from your own network |
FAQ
Do I need a GeoIP account or API key?
No. Odoo reads the free MaxMind GeoLite2 database that is installed on most Odoo servers (/usr/share/GeoIP). The web service fallback is optional.
Is it bad for SEO?
Crawlers are never redirected and the default code is 302, so search engines keep indexing every language and website. Add hreflang through Odoo's own multi-language pages as usual.
Can a visitor still choose another language?
Yes. By default only the first page of a visit is redirected, and any language picked in Odoo's language selector or country picked in the pop-up is respected for 30 days.
Does it change prices or currency?
No, it redirects and switches language. Pricelists by country are handled by Odoo eCommerce itself (country groups on pricelists).
What if the server has no GeoIP database?
Then no country is detected and nothing is redirected, unless you add a geolocation API; the pop-up still lets visitors pick their country.
Compatibility and support
Odoo 19 Community and Enterprise. Requires the Website app only (no eCommerce needed).
Questions, a demo or a custom change: modvantaapps@gmail.com
AUTHOR Modvanta | INCLUDED 21 automated tests |
Buy Now - $20Hire Us for Odoo Work
Written and supported by Modvanta - modvantaapps@gmail.com
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Website (website)
• Discuss (mail) |
| Lines of code | 903 |
| Technical Name |
mdv_geoip_redirect |
| License | OPL-1 |
| Website | https://modvantaapps.tech/odoo-apps/geoip-redirect/ |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module