Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  Domain Name & DNS Issues  >  How to Point a Domain to Odoo?

How to Point a Domain to Odoo?

 3 min

Odoo is a business software suite that contains wide range of IT-role based applications. It includes sales, inventory, accounting, and more. If you are using an online Odoo store, the domain configuration ensures that Odoo websites and applications are seamlessly accessible to your customers. In this guide, we’ll walk you through the process of updating your DNS settings, connecting your domain to Odoo, and verifying that everything works smoothly.

Step 1- Create a Domain Redirect

Before redirecting the domain name, choose the web hosting plan from MilesWeb.  Create an empty website first with the AI website builder or on WordPress. Then, add a domain to your hosting plan. Then, create an .htaccess file in the public_html folder of the domain and add the following code:

RewriteEngine On

RewriteCond %{HTTPS} off [OR]

RewriteCond %{HTTP_HOST} !^www. [NC]

RewriteCond %{HTTP_HOST} ^(?:www.)?(.+)$ [NC]

Save changes.

Step 2 – Configure Your CNAME Record

Log in to MilesWeb’s mPanel and navigate to DNS zone settings. But before that, remove any existing A records linked with the root domain or subdomain. 

Next, create a CNAME record with the following details:

  • Host: www
  • Points to: your-database-name.odoo.com
  • TTL: Default value (e.g., 15890)

Ensure you replace the database name with the original Odoo database name. For Odoo Online: You need to find it in the Odoo account under My Databases. For Odoo.sh: Navigate to Settings → Project Name to locate the main address of your deployment.

After adding the new DNS record in the database, wait for 24 hours of propagation. Then, your domain will start pointing to Odoo. 

Step 3 – Link Your Domain to Your Odoo Database

Linking your domain depends on your hosting type. 

For Odoo Online:

  • Sign in to your Odoo account and open the Database Manager.
  • Navigate to Settings → Domain Names.
  • Click on Use my own domain.
  • Enter your custom domain name.

Click Verify, and then select I confirm, it’s done to complete the setup.

For Odoo.sh:

  • Go to the Branches section and choose your desired branch.
  • Click on Settings → Custom Domains.

Enter your domain name and hit Add Domain to link it with your project.

Step 4 – Update the Root URL of Your Odoo Database

Finalize the domain setup by updating the root URL used in the Odoo database. 

  • Activate Developer Mode in your Odoo instance.
  • Navigate to Settings → Technical → System Parameters.
  • Look for a parameter with the Key: web.base.url.

Click Create to add a parameter, if it not exists. 

In the Value field, enter your custom domain in the format: https://www.yourdomain.com (Make sure to use HTTPS and avoid a trailing slash at the end.)

Step 5 – Map your Domain With your Website

In your Odoo account, navigate to Website → Configuration → Settings → Website Info and select the desired website. 

Enter the domain name in the following format in the given domain field. (www.domain.tld)

Finally, update changes by clicking Save.

Wrap Up

Pointing your domain to Odoo database enhances your brand’s credibility. Also, it enhances the user experience with a memorable and secure web address. By following the given steps, you can confidently manage domain configurations and ensure a flawless connection to your Oddo platform. Connect to MilesWeb techies if you find any issues.

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.