Skip to content

Fix Odoo Website 404 Page Not Found Error: Routes, Pages, and URL Issues

DeployMonkey Team · March 23, 2026 10 min read

The 404 Problem on Odoo Website

Your Odoo website was working fine, then suddenly pages return 404 errors. Or you created a new page but it is not accessible. Or after an upgrade, half your website is broken. The causes range from simple URL typos to complex routing and access control issues.

Common 404 Error Scenarios

# Browser shows:
404: Page not found
The page you were looking for could not be found.

# In Odoo logs:
WARNING odoo.http: 404 NOT FOUND: /my-custom-page

# Or for published content:
werkzeug.exceptions.NotFound: 404 Not Found

Cause 1: Page Not Published

Odoo website pages have a published/unpublished state. Unpublished pages return 404 for public visitors but are visible to admins.

# Fix:
# 1. Log in as admin
# 2. Navigate to the page URL directly
# 3. If the page loads for admin, click the toggle:
#    Top bar → Published / Unpublished toggle → switch to Published

# Or via code:
# Website → Pages → find the page → set "Is Published" = True

# Bulk publish via shell:
pages = env['website.page'].search([('is_published', '=', False)])
for page in pages:
    print(f'Unpublished: {page.url} - {page.name}')
# Publish specific pages:
page.is_published = True

Cause 2: Wrong URL Format

Odoo website URLs follow specific patterns. Getting the format wrong causes 404.

# Standard page URLs:
/               # Homepage
/contactus      # Contact page
/about-us       # Custom page (slug)
/shop           # eCommerce
/blog           # Blog
/blog/our-blog-1/post-title-1  # Blog post

# Common mistakes:
/pages/about-us     # WRONG — no /pages/ prefix
/about-us.html      # WRONG — no file extension
/About-Us           # Case sensitive — use lowercase

# Custom page URL format:
# Website → Pages → Page properties → URL
# Must start with / and use lowercase with hyphens

Cause 3: Website Menu Not Matching Page URL

The menu item links to a URL that does not match any page or route.

# Fix:
# Website → edit mode → Menu editor
# Click each menu item → verify the URL matches an existing page
# Common issue: menu points to /old-url but page was renamed to /new-url

# Or check via database:
SELECT name, url FROM website_menu WHERE website_id = 1 ORDER BY sequence;

Cause 4: Custom Controller Route Missing

If you built a custom page with a Python controller, the route may not be registered.

# Check that your controller is properly defined:
from odoo import http
from odoo.http import request

class MyController(http.Controller):

    @http.route('/my-page', type='http', auth='public', website=True)
    def my_page(self, **kwargs):
        return request.render('my_module.my_template')

# Common issues:
# 1. Module not installed — install/upgrade it
# 2. Missing website=True — page won't appear on website
# 3. auth='user' instead of auth='public' — visitors get redirected to login
# 4. Template XML ID wrong — check __manifest__.py includes the template file

Cause 5: Multi-Website Mismatch

In multi-website setups, pages belong to specific websites. Accessing a page on the wrong website gives 404.

# Check which website a page belongs to:
# Website → Pages → check the "Website" column

# Fix: Assign the page to the correct website or all websites
# In page properties: Website = empty (all websites) or specific website

# Via shell:
page = env['website.page'].search([('url', '=', '/my-page')])
print(f'Website: {page.website_id.name or "All websites"}')
# Assign to all websites:
page.website_id = False

Cause 6: Pages Lost After Module Upgrade

Module upgrades can overwrite or delete website pages defined in XML data files.

# Prevention: Use noupdate="1" for website pages in XML:
<odoo noupdate="1">
    <record id="page_about" model="website.page">
        <field name="name">About Us</field>
        <field name="url">/about-us</field>
        <field name="is_published">True</field>
        <field name="view_id" ref="view_about"/>
    </record>
</odoo>

# If pages are already lost, recreate them:
# Website → New Page → rebuild the content
# Or restore from a backup

Cause 7: URL Rewrite or Redirect Issues

Old URLs may have been redirected, or a redirect loop prevents page access.

# Check website redirects:
# Website → Configuration → Redirects
# Look for redirects that may be catching your URL

# Common issue: redirect from /old-page to /new-page
# but /new-page does not exist either

# Via database:
SELECT url_from, url_to, type FROM website_rewrite ORDER BY url_from;

Cause 8: Blog or Product Slug Changed

Blog posts and products use slugified URLs. If the name changes, the slug changes, breaking old URLs.

# Blog post URL format: /blog/blog-name-ID/post-slug-ID
# Example: /blog/news-1/new-product-launch-5

# If slug changed, the old URL returns 404
# Fix: Create a redirect from old URL to new URL
# Website → Configuration → Redirects → Create
# URL from: /blog/news-1/old-slug-5
# URL to: /blog/news-1/new-slug-5
# Type: 301 (permanent)

Debugging 404 Errors

# 1. Check if the URL works when logged in as admin
# If yes → page exists but is unpublished or restricted

# 2. Check all registered routes:
./odoo-bin shell -d mydb
for rule in http.root.routing_map.iter_rules():
    if '/my-page' in str(rule):
        print(rule, rule.endpoint)

# 3. Check website pages:
env['website.page'].search([('url', 'ilike', 'my-page')])

# 4. Check Odoo logs with debug:
./odoo-bin --log-handler=odoo.http:DEBUG
# This shows which routes are matched and why they fail