Want to connect your custom domain to your Odoo website or database? Whether you’re using Odoo Online or Odoo.sh, the process is fairly straightforward once you know the steps. This guide walks you through everything—from setting up the redirect to mapping your domain with your Odoo account.
Let’s get started.

What You’ll Need
Before you begin, make sure you have:
- A registered domain (either at Hostinger or transferred to Hostinger’s DNS)
- Access to your domain’s DNS zone
- An active Odoo account (Odoo Online or Odoo.sh)
- Your Odoo database name
Step 1: Create a Domain Redirect
The first step depends on whether you have a hosting plan at Hostinger or just a domain.
If You Have a Hosting Plan at Hostinger
Start by adding your domain to your hosting account. You can skip the onboarding wizard and simply create an empty website for now.
Once the domain is added, you’ll need to create an .htaccess file inside the public_html folder of that domain. Add the following code to the file:
textRewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
Save the file once you’ve added the code.
If You Only Have a Domain (No Hosting Plan)
If you’ve registered a domain with Hostinger but don’t have a hosting plan, you can still set up the redirect using Cloudflare. Hostinger has a separate guide on how to redirect a domain without hosting, which involves pointing your domain’s nameservers to Cloudflare and configuring the redirect from there.
Step 2: Create the CNAME Record
Now it’s time to update your DNS settings.
- Go to your domain’s DNS zone in Hostinger (or Cloudflare, if you’re using that method).
- Delete any existing A records for the domain.
- Add a new CNAME record with the following details:
| Field | Value |
|---|---|
| Host | www |
| Points to | database.odoo.com |
| TTL | Default (e.g. 14400) |
Important: Replace database with the actual name of your Odoo database.
- For Odoo Online: You can find your database name in the My databases section of your Odoo account. It’s the current address of your database.
- For Odoo.sh: Go to Settings → Project Name in your Odoo account to locate the main address.
Note: If you’re using Cloudflare (because you don’t have a Hostinger hosting plan), make sure to add the CNAME record inside Cloudflare’s DNS settings, not Hostinger’s.
Once the DNS record is added, you’ll need to wait for DNS propagation, which can take up to 24 hours. After that, your domain will start pointing to Odoo.
Step 3: Map Your Domain to Your Odoo Database
This step connects your domain with your Odoo database. The process differs slightly depending on whether you’re using Odoo Online or Odoo.sh.
For Odoo Online
- Go to your database manager
- Click on Settings → Domain names → Use my own domain
- Enter your domain name
- Click Verify
- Once verified, click I confirm, it’s done
For Odoo.sh
- Go to Branches and select your branch
- Navigate to Settings → Custom domains
- Enter your domain name
- Click Add domain
Step 4: Update the Database Root URL
This step ensures Odoo recognises your custom domain as the main URL for your database.
- Activate developer mode in your Odoo account
- Go to Settings → Technical → System Parameters
- Look for the key called web.base.url (or create it if it doesn’t exist)
- Set the value to your domain in the following format:
texthttps://www.yourdomain.com
Important formatting notes:
- Include the protocol (
https://) - Do not add a trailing slash at the end
Once you’ve updated the root URL, create another system parameter to prevent Odoo from automatically reverting it:
| Key | Value |
|---|---|
| web.base.url.freeze | True |
Step 5: Map Your Domain to Your Website
Finally, you’ll need to link your domain directly to your Odoo website.
- In your Odoo account, go to Website → Configuration → Settings → Website Info
- Select the website you want to connect
- In the Domain field, enter your domain in the following format:
texthttps://www.yourdomain.com
- Click Save
And that’s it—your custom domain should now be pointing to your Odoo site.
Troubleshooting Tips
- DNS propagation can take time. If your domain isn’t working immediately, wait up to 24 hours before troubleshooting further.
- Double-check your CNAME record. Make sure the database name is correct and that the record is pointing to the right Odoo address.
- Check for conflicting A records. If you still have A records in your DNS zone, they may interfere with the CNAME setup.
- Contact Odoo support if the issue seems to be on their end, especially if you’ve followed all the steps correctly but the domain still isn’t connecting.






