Introduction
A content delivery network can serve an Odoo website's static assets from locations closer to its visitors. Odoo continues to generate the website at the origin while matching stylesheets, JavaScript, images, and fonts are requested through the CDN Service Domain.
This guide shows how to configure Odoo's built-in website CDN support. The steps were tested on Odoo 19.0 Community Edition.
Before you start
-
This tutorial shows how to integrate a CDN service into a website.
In this particular demo example we will use:
- barsoom-cdn.cdnsun.org as the CDN Service Domain, and
- https://barsoom.cdnsun.org as the website URL (i.e. barsoom.cdnsun.org is the Origin Domain).
- Please visit the Services/How-To section to obtain your CDN Service Domain.
- Before you take any steps please back up your files and database.
- To integrate a CDN service on https:// website the CDN service must have SSL enabled.
- If your website embeds custom fonts then please first enable CORS for them.
- Before you take any steps please make sure that your CDN Service Domain is ready-to-use here.
Create CDN Static service
Please refer to Creating a CDN Static service for more details.
Configure the CDN in Odoo
-
Open the Odoo administrator login page at /web/login, enter an administrator account, and select Log in.
-
Open Settings > General Settings and scroll to Developer Tools. Select Activate the developer mode. Odoo does not display the website CDN setting until developer mode is active.
-
After Odoo reloads the administration interface, open Settings > Website and find the Content Delivery Network section.
-
Enable Content Delivery Network (CDN). In CDN Base URL, enter the complete HTTPS URL of your CDN Service Domain. For example:
https://barsoom-cdn.cdnsun.org
Keep the default CDN Filters unless your delivery plan requires a narrower set of asset paths. These filters determine which Odoo URLs are rewritten to the CDN Service Domain.
Cross-origin fonts also require an Access-Control-Allow-Origin response header from the origin/CDN delivery path. Follow the custom-font and CORS guide to configure it.
-
Select Save. The saved configuration should show the CDN option enabled, the HTTPS base URL, and the active path filters.
-
Open the public site and confirm that the frontend remains styled normally and static assets load from the CDN Service Domain.
Verify & Troubleshoot
- View HTML source code of your web pages to verify that you are using CDN, you should see source attribute of your images, CSS, JavaScript, etc. beginning with your CDN Service Domain.
- Don't see your CDN Service Domain in the source code of your web pages? If your website is using any cache plug-in/mechanism then you might want to clear/flush its cache.
- Having trouble with custom fonts? Please refer to Using custom fonts with CDN - setting CORS for more details.
- Still having trouble? Check your CDN URLs using our content check tool or please refer to Debugging a CDN service for more hints.




