ชื่อโดเมน

Domain names serve as easily recognizable labels for online locations such as websites, translating difficult-to-remember numerical IP addresses into readable, memorable web addresses.

Odoo Online and Odoo.sh databases use a subdomain of the odoo.com domain by default (e.g., mycompany.odoo.com).

However, you can register a free domain name on Odoo Online or use a domain name you own.

Register a free domain name

To register a one-year free domain name for an Odoo Online database:

  1. Open the database manager.

  2. Click the database name and select Domain Names.

  3. ค้นหาชื่อโดเมนที่ต้องการและตรวจสอบความพร้อม

  4. Select the desired domain name, fill in the Domain Owner form, and click Register. The domain name is directly linked to the database.

    Important

    A verification email from noreply@domainnameverification.net will be sent to the email address provided. Verifying the email address is necessary to keep the domain active and receive the renewal quote before expiration.

  5. Finally, map the domain name to your Odoo website.

เงื่อนไขและข้อกำหนด

The domain name registration is free for the first year. After this period, Odoo will continue to manage the domain in partnership with Gandi.net, the domain name registrar, and you will be charged Gandi.net's renewal rate. Odoo sends a renewal quotation every year to the email address specified in the Domain Owner form several weeks before the domain's expiration date. The domain is renewed automatically when the quotation is confirmed.

  • ข้อเสนอนี้ใช้ได้กับฐานข้อมูล Odoo Online เท่านั้น

  • The offer is limited to one domain name per client.

  • The offer is limited to the registration of a new domain name.

  • The offer is available to One App Free plans. Ensure your website contains sufficient original content for Odoo to verify that your request is legitimate and in compliance with Odoo's Acceptable Use Policy. Given the high number of requests, it can take Odoo several days to review them.

บันทึก DNS

To manage a free domain name's DNS records:

  1. Open the database manager.

  2. Click the database name and select Domain Names.

  3. Click DNS.

Tip

  • A: บันทึก A เก็บที่อยู่ IP ของโดเมน มันถูกสร้างขึ้นโดยอัตโนมัติและ ไม่สามารถ แก้ไขหรือลบได้

  • CNAME: CNAME records forward one domain or subdomain to another domain. One is automatically created to map the www subdomain to the database. If the database is renamed, the CNAME record must be updated accordingly.

  • MX: บันทึก MX จะสั่งให้เซิร์ฟเวอร์ทราบว่าควรส่งอีเมลไปที่ใด

  • TXT: TXT records can be used for various purposes (e.g., verifying domain name ownership).

การแก้ไขบันทึก DNS อาจใช้เวลาถึง 72 ชั่วโมง เพื่อเผยแพร่ทั่วโลกบนเซิร์ฟเวอร์ทั้งหมด

Subdomains

Adding a subdomain label to a free domain name (e.g., subdomain.yourdomain.com) allows creating multiple websites or creating database records from emails received on an alias (e.g., email@subdomain.yourdomain.com).

To create a subdomain, add a CNAME record:

  1. Open the database manager.

  2. Click the database name and select Domain Names.

  3. Click DNS.

  4. Click Add DNS record and select CNAME.

    • Name: enter the desired subdomain label (e.g., subdomain).

    • Content: enter original database domain with a period at the end (e.g., mycompany.odoo.com.).

  5. Click Add record.

Note

To use a subdomain's address for your Odoo website, it is necessary to:

  1. Map the subdomain to your Odoo database.

  2. Map the subdomain to your Odoo website.

Mailbox

The free domain name does not include a mailbox. However, there are two options for linking it to a mailbox.

ใช้โดเมนย่อย

After creating a subdomain, go to the database and open the Settings app. Under the Alias Domain field, enter the subdomain (e.g., subdomain.yourdomain.com), click Create, and then Save.

ใช้ผู้ให้บริการอีเมลภายนอก

To use an external email provider, it is necessary to add an MX record:

  1. Open the database manager.

  2. Click the database name and select Domain Names.

  3. Click DNS.

  4. Click Add DNS record and select MX.

  5. Fill in the Name, Content, and Priority fields according to the external email provider.

Google Workspace

To use a free domain name with Gmail, register for Google Workspace.

During the registration process, select Set up using your existing domain when asked to Choose a way to set up your account, and enter your domain (e.g., yourdomain.com) when asked What's your business's domain name?.

Domain ownership verification
  1. Sign in to Google Workspace. When asked to verify you own your domain, click Switch to manual verification.

    Switching to manual domain verification on Google Workspace
  2. Select gandi.net as the Domain host and click Continue.

    Selecting the domain host on Google Workspace
  3. Copy the content of the Value field under TXT record. Leave the window open.

    Copying the TXT value on Google Workspace
  4. Add a TXT record.

    1. Open the database manager.

    2. Click the database name and select Domain Names.

    3. Click DNS.

    4. Click Add DNS record and select TXT.

    5. Enter @ in the Name field, paste the Value provided by Google in the Content field, and click Add record.

    Creating a TXT record to verify domain name ownership
  5. Go back to Google Workspace, tick the box at the bottom, and click Confirm.

Redirect emails to Gmail
  1. Open the database manager.

  2. Click the database name and select Domain Names.

  3. Click DNS.

  4. Click Add DNS record and select MX.

  5. Enter @ in the Name field, 1 in the Priority field, smtp.google.com. in the Content field, and click Add record.

    Creating an MX record to redirect emails to Gmail
  6. Open the Google Workspace Admin console, click Activate Gmail for your domain, and follow the steps.

กำหนดค่าชื่อโดเมนที่มีอยู่

If you already own a domain name, you can use it for your Odoo website.

Warning

To avoid potential SSL certificate validation issues, it is strongly recommended to follow these steps in the specified order:

  1. If you are transferring your website, set up URL redirections before transferring the domain name to preserve the website's SEO.

  2. Add a CNAME record.

  3. Redirect your naked domain name (this step is optional but recommended).

  4. Map your domain name to your Odoo database.

  5. Map your domain name to your Odoo website.

เพิ่มบันทึก CNAME

Adding a CNAME record to forward your domain name to the address of your Odoo database is required.

ที่อยู่เป้าหมายของบันทึก CNAME ควรเป็นที่อยู่ฐานข้อมูลของคุณตามที่กำหนดไว้ตอนสร้าง (เช่น mycompany.odoo.com)

คำแนะนำเฉพาะขึ้นอยู่กับบริการโฮสต์ DNS ของคุณ

Redirect a naked domain

Note

Although optional, completing this step is advised.

To let visitors use your naked domain name (a domain name without any subdomains or prefixes) (yourdomain.com), creating a 301 redirect (a permanent redirect from one URL to another) to www.yourdomain.com is required:

  • from http://yourdomain.com to https://www.yourdomain.com, and

  • from https://yourdomain.com to https://www.yourdomain.com.

The specific instructions depend on your DNS hosting service. However, not all of them offer to redirect a naked domain to HTTPS. If you encounter any issues, we recommend using Cloudflare.

Using Cloudflare to secure and redirect a naked domain

  1. Sign up and log in to Cloudflare.

  2. Enter your domain name on Cloudflare's dashboard and select Quick scan for DNS records.

  3. Choose a plan (the free plan is sufficient).

  4. Follow Cloudflare's instructions and recommendations to complete the activation.

  5. Add a CNAME record to redirect your naked domain (yourdomain.com) to the www subdomain (e.g., www.yourdomain.com) by clicking DNS in the navigation menu, then clicking the Add record button, and using the following configuration:

    • Type: select CNAME.

    • Name: enter @ (or yourdomain.com).

    • Target: enter www. + yourdomain.com, e.g., www.yourdomain.com.

    • Proxy status: toggle the option on (Proxied).

    • คลิก บันทึก

    Adding a CNAME DNS record to Cloudflare to redirect a naked domain to a www subdomain
  6. Add another second CNAME record to redirect the www subdomain (e.g., www.yourdomain.com) to your database address (e.g., mycompany.odoo.com) using the following configuration:

    • Type: select CNAME.

    • Name: enter www. followed by your domain name, e.g., www.yourdomain.com.

    • Target: enter your database's address as defined at its creation e.g., mycompany.odoo.com

    • Proxy status: toggle the option off (DNS only).

    • คลิก บันทึก

    Adding a CNAME DNS record to Cloudflare to redirect a www subdomain to an Odoo database
  7. Define a redirect rule to permanently redirect (301) your naked domain (e.g., yourdomain.com) to both http:// and https:// by going to Rules ‣ Overview ‣ Create rule ‣ Redirect Rule. On that page:

    • Enter any Rule name.

    • Under the If incoming requests match... section, select Custom filter expression and use the following configuration:

      • Field: select Hostname.

      • Operator: select equals.

      • Value: enter your domain name, e.g., yourdomain.com.

    • Under the Then... section, use the following configuration:

      • Type: select Dynamic.

      • Expression: enter the following expression concat("https://www.yourdomain.com", http.request.uri.path), replacing yourdomain.com with your domain name.

      • Status code: select 301.

      • Preserve query string: enable the option by ticking the box.

    • Click Deploy.

    Defining a Cloudflare redirect rule to create a permanent redirect (301)
  8. Go to SSL/TLS ‣ Overview ‣ Configure and ensure the encryption mode is set to Full.

    Setting the encryption mode to full on Cloudflare

แมปชื่อโดเมนกับฐานข้อมูล Odoo

Warning

Ensure you have added a CNAME record to your domain name's DNS before mapping your domain name to your Odoo database.

Failing to do so may prevent the SSL certificate from being validated and could result in a certificate name mismatch error. Web browsers often display this as a warning, such as "Your connection is not private".

If you encounter this error after mapping the domain name to your database, wait up to five days, as the validation may still be in progress. If not, you can submit a support ticket, including screenshots of your CNAME records.

  1. Open the database manager.

  2. Click the database name and select Domain Names.

  3. Click Use my own domain.

  4. Enter the domain name (e.g., www.yourdomain.com), click Verify, then I confirm, it's done.

การแมปชื่อโดเมนกับฐานข้อมูล Odoo Online

การเข้ารหัส SSL (โปรโตคอล HTTPS)

SSL encryption allows visitors to navigate a website over a secure connection, indicated by the https:// protocol at the beginning of a web address rather than the non-secure http:// protocol.

Odoo generates a separate SSL certificate for each domain mapped to a database using Let's Encrypt's certificate authority and ACME protocol.

Note

  • การสร้างใบรับรองอาจใช้เวลามากถึง 24 ชั่วโมง

  • Several attempts to validate your certificate are made over the next five days after you map your domain name to your database.

  • หากคุณใช้บริการอื่น คุณสามารถใช้บริการต่อไปหรือเปลี่ยนเป็นของ Odoo ได้

Important

ไม่มีการสร้างใบรับรอง SSL สำหรับโดเมนเปล่า (ชื่อโดเมนที่ไม่มีโดเมนย่อยหรือคำนำหน้า)

URL ฐานเว็บของฐานข้อมูล

Note

If the Website app is installed on your database, skip this section and continue from the Map a domain name to an Odoo website section.

URL ฐานเว็บ หรือ URL รากของฐานข้อมูลส่งผลต่อที่อยู่เว็บไซต์หลักของคุณและลิงก์ทั้งหมดที่ส่งถึงลูกค้าของคุณ (เช่น ใบเสนอราคา ลิงก์พอร์ทัล และอื่นๆ)

หากต้องการทำให้ชื่อโดเมนแบบกำหนดเองของคุณเป็น URL ฐานเว็บ ของฐานข้อมูลของคุณ ให้เข้าถึงฐานข้อมูลของคุณโดยใช้ชื่อโดเมนแบบกำหนดเองของคุณ และเข้าสู่ระบบในฐานะผู้ดูแลระบบ (ส่วนผู้ใช้ของกลุ่มสิทธิ์การเข้าถึงการตั้งค่าภายใต้การดูแลระบบ)

Important

If you access your database using the original Odoo address (e.g., mycompany.odoo.com), the database's web base URL will be updated accordingly. To prevent the automatic update of the web base URL when an administrator logs in to the database, activate the developer mode, go to Settings ‣ Technical ‣ System Parameters ‣ New, and enter web.base.url.freeze as the Key and True as the Value.

Note

You can also set the web base URL manually. To do so, activate the developer mode, go to Settings ‣ Technical ‣ System Parameters, and search for the web.base.url key (create it if necessary) and enter the full address of your website as the value (e.g., https://www.yourdomain.com). The URL must include the protocol https:// (or http://) and not end with a slash (/).

แมปชื่อโดเมนกับเว็บไซต์ Odoo

Note

การแมปชื่อโดเมนของคุณกับเว็บไซต์ของคุณแตกต่างจากการแมปชื่อโดเมนกับฐานข้อมูลของคุณ:

  • It defines your domain name as the main one for your website, helping search engines index it correctly.

  • It defines your domain name as the base URL for your database, including portal links sent to your customers via email.

  • หากคุณมีหลายเว็บไซต์ ระบบจะจับคู่ชื่อโดเมนของคุณกับเว็บไซต์ที่เหมาะสม

Go to Website ‣ Configuration ‣ Settings. If you have multiple websites, select the one you want to configure. In the Domain field, enter the URL of your website (e.g., https://www.yourdomain.com) and Save.

Warning

การแมปชื่อโดเมนของคุณกับเว็บไซต์ Odoo จะป้องกันไม่ให้ Google Search สร้างดัชนีที่อยู่ฐานข้อมูลเดิมของคุณ (เช่น mycompany.odoo.com)

If both addresses are already indexed, it may take some time for the indexation of the second address to be removed from Google Search. You can use the Google Search Console to fix the issue.

Subdomains

Adding a subdomain label to a domain name (e.g., subdomain.yourdomain.com) allows creating multiple websites with a single domain name. To do so:

  1. Add a CNAME record to forward your subdomain (e.g., subdomain.yourdomain.com) to the address of your Odoo database (e.g., mycompany.odoo.com).

  2. Map the subdomain to your Odoo database.

  3. Map the subdomain to your Odoo website.