In short. Odoo scopes redirects by website, keeps shared rules available, and documents Sequence for redirect-chain order.
Definition: In Odoo 19.0, a redirect record can be limited to a website, disabled with Active, and assigned a Sequence for redirect chains. Odoo's source also supports rules shared by all websites through an empty Website value.
Key facts
- Odoo places redirect records at
Website ‣ Configuration ‣ Redirectsafter developer mode is activated, according to its website pages documentation. - The Website field selects a specific website. In the Odoo 19.0 model, the corresponding
website_idfield is a relation towebsite. - Turning Active off deactivates the redirection. The model's Boolean field defaults to
Truefor a newly created record. - Odoo describes Sequence as the field that defines the order in which redirections are performed in a redirect chain.
- Odoo's 19.0 website domain includes
website_id = Falseand the current website, so a rule with no selected website can apply across websites.
How does the Website field scope a rule?
Open the redirect records here:
Website ‣ Configuration ‣ Redirects
Odoo's documentation labels the field Website and says to select a specific website. The underlying website.rewrite model stores that choice in website_id, a relation to the website model. The field is optional in the model, which leaves an empty value available for a shared rule.
The 19.0 website model defines its reusable website domain as follows:
def website_domain(self):
return Domain('website_id', 'in', [False, *self.ids])
For the current website, this accepts two scopes: a record with no website selected and a record assigned to that website. The HTTP handler uses this domain for 301 Moved permanently and 302 Moved temporarily records. The routing handler applies the same shared-or-current test directly for 308 Redirect / Rewrite and 404 Not found records. A rule assigned to another website therefore is outside the current request's website domain.
What does Active control?
Odoo documents Active as a switch: turning it off deactivates the redirection. The model declares active as a Boolean with a default of True, so an ordinary new redirect starts active. Use this field to stop a rule while retaining its record and its configured source and destination in the redirect configuration.
The source model also defines 404, 301, 302, and 308 as the available action values. The documentation describes 301 for permanent redirections of unpublished or deleted static pages, 302 for short-term redirections, and 308 for permanent rewrites typically used with dynamic pages. The Active switch is a separate field from that action choice.
How is Sequence used in ordering?
Odoo's public page gives Sequence a clear configuration meaning: it defines the order in which redirections are performed, including a chain where one URL points to another URL that then points to a further URL. The model stores Sequence as an Integer field.
The 19.0 request code exposes an implementation detail that matters when auditing a rule set. For 301 and 302, the fallback handler searches matching records with order='url_from DESC' and limit=1. For 308 and 404, the routing handler builds a mapping keyed by url_from. Neither handler names Sequence in its selection expression. The documentation therefore supplies the user-facing role of Sequence, while the downloaded request handlers leave equal URL from values without a documented tie rule.
How should a multi-website redirect record be checked?
First identify the current website, then inspect the redirect's Website value and Active switch. A blank Website value is included by the 19.0 website domain for the current site, while a selected website narrows the record to that site's request handling. Next compare the URL from values in any chain and the Sequence values shown in the form. For 301 and 302, also account for the handler's explicit url_from DESC and single-record selection; for 308 and 404, account for the URL-keyed routing map.
Related terms
FAQ
Does an empty Website value mean that no website uses the rule?
No. Odoo's 19.0 website_domain() includes False and the current website ID, so an empty Website value is part of the shared scope used for the current website.
Does turning off Active delete a redirect record?
Odoo documents the switch as a way to deactivate the redirection. The website.rewrite model defines Active alongside Website, URL, action, and Sequence fields.
Does the lowest Sequence always decide the HTTP response?
Odoo documents Sequence as the order field for redirect chains. The 19.0 handlers shown above select 301 and 302 records by url_from DESC and build the 308 and 404 map by url_from, so the downloaded source does not establish a lowest-Sequence rule for every request.
Sources
- Odoo, "Pages", Odoo 19.0 documentation
- Odoo, "website_rewrite.py", Odoo 19.0 source
- Odoo, "ir_http.py", Odoo 19.0 source
- Odoo, "website.py", Odoo 19.0 source
Check how a page reads to answer engines. Open the GEO score analyzer