{"id":674,"date":"2023-04-24T09:09:28","date_gmt":"2023-04-24T09:09:28","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2023\/04\/24\/7733038-how-to-point-a-domain-to-odoo-at-hostinger\/"},"modified":"2026-11-03T09:46:23","modified_gmt":"2026-11-03T09:46:23","slug":"7733038-how-to-point-a-domain-to-odoo-at-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/7733038-how-to-point-a-domain-to-odoo-at-hostinger\/","title":{"rendered":"How to point a domain to Odoo at Hostinger"},"content":{"rendered":"<p class=\"no-margin\">Point a domain to Odoo at Hostinger by redirecting the root domain to www and adding a www CNAME record that points to your Odoo database. Then update your Odoo database URL and map the domain to your Odoo website.<\/p>\n<h2 id=\"h_209c96e2b6\">Step 1 \u2013 Create a domain redirect<\/h2>\n<h3 id=\"h_a3ae91c7db\">With a hosting plan at Hostinger<\/h3>\n<p class=\"no-margin\">If you have a hosting plan at Hostinger, <b><a data-click-id=\"hgr-post-content-link-add-the-domain\" class=\"intercom-content-link\" href=\"\/support\/1583214-how-to-add-a-website-in-hostinger\/\" target=\"_blank\" rel=\"noopener\">add the domain<\/a><\/b> to your hosting plan. You can skip the onboarding process and create an empty website.<\/p>\n<p class=\"no-margin\">Next, <b><a data-click-id=\"hgr-post-content-link-create-an-htaccess-file\" class=\"intercom-content-link\" href=\"\/support\/1583307-how-to-create-an-htaccess-file-at-hostinger\/\" target=\"_blank\" rel=\"noopener\">create an .htaccess file<\/a> <\/b>in the <b>public_html <\/b>folder of the domain<b> <\/b>and add the following code:<\/p>\n<pre>RewriteEngine On\r\nRewriteCond %{HTTPS} off [OR]\r\nRewriteCond %{HTTP_HOST} !^www\\. [NC]\r\nRewriteRule ^(.*)$ https:\/\/www.%{HTTP_HOST}\/$1 [L,R=301,NE]<\/pre>\n<p class=\"no-margin\">Make sure to <b>save the changes<\/b>.<\/p>\n<h3 id=\"h_ae86acd8ec\">Without a hosting plan at Hostinger<\/h3>\n<p class=\"no-margin\">If you only have a domain (not a hosting plan), you can create the redirect with the help of <b>Cloudflare<\/b>: <b><a data-click-id=\"hgr-post-content-link-how-to-redirect-a-domain-without-a-hosting-plan\" class=\"intercom-content-link\" href=\"\/support\/3212384-how-to-redirect-a-domain-without-a-hosting-plan-at-hostinger\/\" target=\"_blank\" rel=\"noopener\">How to Redirect a Domain Without a Hosting Plan<\/a><\/b>.<\/p>\n<h3>Naked (root) domain limitation<\/h3>\n<p>If your domain<strong> doesn&#8217;t use www<\/strong> \u2014 for example, you want domain.tld itself (not www.domain.tld) to load your Odoo site \u2014 please note the following:<\/p>\n<ul>\n<li>CNAME records <strong>cannot<\/strong> be applied at the root\/apex of a domain. This is a DNS standard limitation, which is why Odoo&#8217;s setup (and this guide) requires pointing the www version of your domain.<\/li>\n<li>To make the naked domain work, you have two options:\n<ul>\n<li>Keep a lightweight hosting plan on the domain solely to serve a redirect from the naked domain to www.domain.tld.<\/li>\n<li>Use a DNS provider that supports ALIAS, ANAME, or CNAME-flattening records at the root.<\/li>\n<\/ul>\n<\/li>\n<li>Domain forwarding <strong>cannot<\/strong> be used for this. Forwarding your naked domain to https:\/\/www.domain.tld is a same-domain redirect, which the forwarding feature does not support and will fail or error out.<\/li>\n<\/ul>\n<h2 id=\"h_05a192312b\">Step 2 \u2013 Create the CNAME record<\/h2>\n<p class=\"no-margin\">Access your domain&#8217;s <b>DNS zone<\/b> and delete any existing <b><a data-click-id=\"hgr-post-content-link-a-records\" class=\"intercom-content-link\" href=\"\/support\/4468886-how-to-manage-a-records-at-hostinger\/\" target=\"_blank\" rel=\"noopener\">A records<\/a><\/b>. Then, create the following <b><a data-click-id=\"hgr-post-content-link-cname-record\" class=\"intercom-content-link\" href=\"\/support\/4738777-how-to-manage-cname-records-at-hostinger\/\" target=\"_blank\" rel=\"noopener\">CNAME record<\/a><\/b>:<\/p>\n<div class=\"intercom-interblocks-callout\" style=\"background-color: #e8e8e880;border-color: #73737633\">\n<p class=\"no-margin\"><b>Host<\/b>: www<\/p>\n<p class=\"no-margin\"><b>Points to<\/b>: <i>database<\/i>.odoo.com<\/p>\n<p class=\"no-margin\"><b>TTL<\/b>: use the default value, e.g., 14400<\/p>\n<\/div>\n<p class=\"no-margin\">Make sure to replace <i><code>database<\/code><\/i> with the name of your Odoo database:<\/p>\n<ul>\n<li>\n<p class=\"no-margin\">For <b>Odoo Online<\/b>, it is the current address of your database; you can check it in the <b>My databases<\/b> section of your Odoo account<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">For <b>Odoo.sh<\/b>, go to <b>Settings<\/b> \u2192 <b>Project Name<\/b> in your Odoo account to find the name of the main address<\/p>\n<\/li>\n<\/ul>\n<p class=\"no-margin\"><b>NOTE<\/b><\/p>\n<ul>\n<li>\n<p class=\"no-margin\">If you used the <b><a data-click-id=\"hgr-post-content-link-second-option-in-step-1\" class=\"intercom-content-link\" href=\"\/support\/7733990-how-to-point-a-domain-to-systeme-io-at-hostinger\/#h_3c176222e1\" target=\"_blank\" rel=\"noopener\">second option in Step 1<\/a><\/b>, your domain&#8217;s <b>DNS zone<\/b> should be <b><a data-click-id=\"hgr-post-content-link-managed-from-cloudflare\" class=\"intercom-content-link\" href=\"\/support\/4410549-how-to-manage-the-dns-zone-at-cloudflare\/\" target=\"_blank\" rel=\"noopener\">managed from Cloudflare<\/a><\/b>; i.e., you need to create these CNAME records in Cloudflare<\/p>\n<\/li>\n<\/ul>\n<p class=\"no-margin\">Once you add the new DNS records, <b>wait for <a data-click-id=\"hgr-post-content-link-propagation\" class=\"intercom-content-link\" href=\"\/support\/4146975-what-is-dns-propagation-at-hostinger\/\" target=\"_blank\" rel=\"noopener\">propagation<\/a> to complete<\/b> (up to 24 hours), and your domain will start pointing to <b>Odoo.<\/b><\/p>\n<h2 id=\"h_fb9607213d\">Step 3 \u2013 Map your domain with your database<\/h2>\n<p class=\"no-margin\">The steps depend on the type of your service:<\/p>\n<ul>\n<li>\n<p class=\"no-margin\">For <b>Odoo online<\/b>: go to your <b>database manager<\/b>, click on <b>Settings<\/b> \u2192 <b>Domain names<\/b> \u2192 <b>Use my own domain<\/b>; enter your domain name, click on <b>Verify<\/b>, and, finally, click on <b>I confirm, it\u2019s done<\/b><\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">For <b>Odoo.sh<\/b>: go to <b>Branches <\/b>\u2192<b> <\/b>select your branch \u2192 Settings \u2192 <b>Custom domains<\/b>;<b> <\/b>enter your domain name, and, finally, click on <b>Add domain<\/b><\/p>\n<\/li>\n<\/ul>\n<h2 id=\"h_2927f4472e\">Step 4 \u2013 Update the database root URL<\/h2>\n<p class=\"no-margin\">Activate the <b>developer mode <\/b>on your Odoo account, then go to <b>Settings<\/b> \u2192 <b>Technical<\/b> \u2192 <b>System Parameters<\/b>.<\/p>\n<p class=\"no-margin\">Find the <b>web.base.url<\/b> key, or create it if it does not exist, and enter your domain name in the following format:<\/p>\n<pre><code>https:\/\/www.domain.tld<\/code><\/pre>\n<p class=\"no-margin\">Make sure to include the protocol (HTTPS) and remove any slash at the end (\/).<\/p>\n<p class=\"no-margin\">Once your database root URL is updated, create the following <b>system parameter <\/b>to prevent it from reverting automatically:<\/p>\n<ul>\n<li>\n<p class=\"no-margin\"><b>Key<\/b>: web.base.url.freeze<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><b>Value<\/b>: True<\/p>\n<\/li>\n<\/ul>\n<h2 id=\"h_86f3393039\">Step 5 \u2013 Map your domain with your website<\/h2>\n<p class=\"no-margin\">On your Odoo account, go to <b>Website<\/b> \u2192 <b>Configuration<\/b> \u2192 <b>Settings<\/b> \u2192 <b>Website Info <\/b>and select the desired website.<\/p>\n<p class=\"no-margin\">Once there, enter your domain name in the <b>Domain<\/b> field with the following format:<\/p>\n<pre><code>https:\/\/www.domain.tld<\/code><\/pre>\n<p class=\"no-margin\">And click on <b>Save<\/b>.<\/p>\n<p class=\"no-margin\">Once propagation completes and the domain is mapped, your domain loads your Odoo website. For other services you can point your domain to, see <a data-click-id=\"hgr-post-content-link-how-to-point-a-domain-to-external-services-at-hostinger\" href=\"https:\/\/www.hostinger.com\/support\/4737652-how-to-point-a-domain-to-external-services-at-hostinger\/\">How to point a domain to external services at Hostinger.<\/a><\/p>\n<h2 id=\"h-troubleshooting\">Troubleshooting<\/h2>\n<p><em><strong>&#8220;Domain forwarding gives an error \/ won&#8217;t redirect to www&#8221; <\/strong><\/em><\/p>\n<p>This happens when trying to forward a naked domain to the www version of the same domain \u2014 a same-domain redirect, which isn&#8217;t supported by domain forwarding. Use the .htaccess redirect method in Step 1 instead (requires an active hosting plan on the domain).<\/p>\n<p><em><strong>&#8220;My site works on www but not on the naked domain&#8221;<\/strong> <\/em><\/p>\n<p>This is expected unless a redirect from the naked domain to www has been set up. See the &#8220;Naked (root) domain limitation&#8221; above.<\/p>\n<p class=\"no-margin\"><b>Additional resources<\/b><\/p>\n<ul>\n<li>\n<p class=\"no-margin\"><b><a data-click-id=\"hgr-post-content-link-configure-your-existing-domain-name-odoo\" class=\"intercom-content-link\" href=\"https:\/\/www.odoo.com\/documentation\/16.0\/administration\/maintain\/domain_names.html#configure-your-existing-domain-name\" target=\"_blank\" rel=\"noopener\">Configure your existing domain name \u2014 Odoo<\/a><\/b><\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">If you encounter any issues with pointing your domain, please get in touch with <b><a data-click-id=\"hgr-post-content-link-odoo-support\" class=\"intercom-content-link\" href=\"https:\/\/www.odoo.com\/help\" target=\"_blank\" rel=\"noopener\">Odoo support<\/a><\/b><\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Point a domain to Odoo at Hostinger with a www redirect and a CNAME record to your Odoo database, then map the domain to your Odoo website.<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_content_updated_date":"","include_on_kodee":true,"footnotes":""},"categories":[174],"tags":[],"class_list":["post-674","post","type-post","status-publish","format-standard","hentry","category-pointing-domain-to-external-services"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/7733038-how-to-point-a-domain-to-odoo-at-hostinger","default":1},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/support\/7733038-comment-faire-pointer-un-domaine-vers-odoo-chez-hostinger","default":0}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/674","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=674"}],"version-history":[{"count":5,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/674\/revisions"}],"predecessor-version":[{"id":24354,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/674\/revisions\/24354"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=674"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}