网站域名

**域名**用作您网站的地址。它使互联网更容易访问,因为它允许用户键入有意义的网址,例如“www.odoo.com”,而不是其服务器的IP地址和一系列数字。

您可以使用自定义域名访问您的 Odoo 数据库和网站:

  • 通过 :ref:`使用 Odoo 注册免费域名<域名/odoo-register>`(用于 Odoo Online 数据库)

  • 通过 :ref:`配置您已经拥有的自定义域<域名/现有>”。

注解

Odoo Online和 Odoo.sh 数据库,包括他们的网站,默认情况下使用“odoo.com”子域作为URL和电子邮件(例如,“https://example.odoo.com”)。

重要

Odoo为所有Odoo Online数据库提供一个 免费的自定义域名 。访问者可以使用 www.example.com 等地址而不是默认的 example.odoo.com 地址来访问您的网站。

关于域名

拥有一个 **的域名 **您的品牌与您的业务或组织的名称一样重要,因为它是访问者会注意到的第一件事。我们建议您保持它们*简单,简短,易于记忆和拼写*。

A subdomain is a domain that is a part of another domain. It often refers to the additional part that comes before the main domain name. Traditionally, most websites use the www. subdomain, but any string of letters can be used as well. You can use subdomains to direct your visitors to other websites than your main website or to specific pages (e.g., experience.odoo.com points to a specific page.)

所有域名都在 **名系统 ****DNS **引用,该系统是互联网的巨型目录。有许多 DNS 服务器,因此对 DNS 的任何修改最多可能需要 72 小时才能在所有服务器上传播到全球。

Indexing of domain names by search engines

Search engines, such as Google and Bing, rely on web crawlers (robots that explore and analyze the web) to index all websites and their related domain names. These crawlers discover new URLs thanks to links on known web pages. As a result, search engines should index domain names automatically after a while, as long as their URLs are mentioned elsewhere on the Internet.

Improving the appearance and positioning of web pages on search engines is a practice named “Search Engine Optimization” (SEO).

小技巧

Adding relevant content, optimizing metadata, and building high-quality backlinks can all help improve a website’s search engine visibility.

Some search engines provide tools for web admins, such as Google Search Console and Bing Webmaster Tools, to help you analyze and improve your page ranking. To use these services, you must prove that you are the owner of your domain name. One way to verify the ownership of your domain name is by adding a DNS record. You can do this for domain names registered with Odoo and for domain names managed by other providers.

使用Odoo注册免费域名

您可以直接从Odoo网站或数据库管理器为您的Odoo在线数据库注册域名。

重要

  • 您的域名 费一 ,如果您在Odoo注册!

  • 域名已在域名注册商「Gandi <https://www.gandi.net/>」注册。

  • 您是域名的所有者,可以将其用于其他目的。

  • Odoo为您管理付款和技术支持。

  • This offer doesn’t include any mailbox. However, you can configure your MX records to use your own email server or solution such as Google Workspace.

To do so, go to Website ‣ Go to website ‣ Promote ‣ Domain Name. Alternatively, open your database manager, click on the settings button next to your database, then on Domain names.

Clicking on Domain Names from an Odoo website

搜索您选择的域名以检查其可用性,然后选择要为您的网站注册的域名。

The search of the domain name example.com shows which associated domains are available.

接下来,在表格中填写您的信息,成为域名所有者。

您的域名直接链接到您的数据库,但您仍然需要:ref:将您的域名与您的网站<域名/网站地图>

注解

  • Free domain names are also available for free Odoo Online databases (if you installed one app only, for example). In this case, Odoo reviews your request and your website to avoid abuse. This process can take several days due to the success of the offer.

  • 这尚不适用于 Odoo.sh 数据库。

管理您在Odoo注册的域名

要管理您在Odoo注册的域名的DNS记录或可视化与其关联的联系人,请打开“数据库管理器<https://www.odoo.com/my/databases>”_,单击数据库旁边的:guilabel:`settings`按钮,在:guilabel:`Domain names`上,然后在:guilabel:`Contacts`或:guilabel:`DNS`上。

Management of the domain names linked to an Odoo database

注解

如果您需要进一步的帮助来管理您的域名,请“提交支持票证<https://www.odoo.com/help>”_。

配置现有域名

如果您已经拥有域名,则可以使用它来指向您的网站。

为避免 :ref:`SSL 证书验证<域名/ssl>`的任何问题,我们强烈建议您按以下顺序执行以下操作:

  1. :ref:在域名的 DNS 区域上添加一个 CNAME 记录<域名/cname>”。

  2. :ref:将您的域名与 Odoo 数据库<域名/db-map>

  3. :ref:将您的域名与您的Odoo网站<域名/网站地图>

  4. Optionally: Change the web base address of your database.

添加 CNAME 记录

A CNAME record is a type of DNS record that points to the domain of another website rather than directly to an IP address.

您需要一个指向您的Odoo数据库的CNAME记录。数据库管理器中详细介绍了这些要求。

目标地址是数据库的当前地址,在创建时定义(例如,“example.odoo.com”)

  1. 打开域名的经理信息中心。

  2. 打开要配置的域名的“DNS 区域”管理页面。

  3. 创建指向数据库地址的“CNAME”记录。

While Odoo suggests creating a CNAME record for your www. subdomain (www.example.com), you can of course use any domain name of your choice, with any subdomain (e.g., anything.example.com).

Example

您拥有域名“example.com”,并且您在地址“example.odoo.com”拥有Odoo在线数据库。您希望主要使用域“www.example.com”访问Odoo数据库,但也希望使用:ref:“裸域<域名/裸域>”example.com“。访问Odoo数据库。

为此,您需要为“www”子域创建一个 CNAME 记录,并将“example.odoo.com”作为目标。DNS 区域管理器生成以下规则并将其添加到 DNS 区域:“www IN CNAME example.odoo.com”。

您还可以创建从“example.com”到“wwww.example.com”的重定向。

您的新 DNS 记录将传播到所有 DNS 服务器。

裸域名

**裸域名**是在地址开头没有任何子域名的域名(例如,“odoo.com”而不是“www.odoo.com”)。

您可能希望裸域名重定向到您的网站,因为某些访问者可能无法输入完整的域名来访问您的网站。

  1. 打开域名的经理信息中心。

  2. 创建一个从裸域名(“example.com”)到您的主域名(“www.example.com”)的

注解

根据您的域名注册机构,此重定向可能已预先配置。

将您的域名与 Odoo 数据库进行映射

打开数据库管理器<https://www.odoo.com/my/databases>“_,单击数据库旁边的 :guilabel:settings 按钮,单击 :guilabel:Domain names,然后单击右列底部的 :guilabel:Use my own domain

键入要添加到此数据库的域名,然后单击:guilabel:’Verify’以检查CNAME记录是否已正确配置。完成后,点击:guilabel:’我确认,它完成了’。

Verification of the CNAME records of a domain name before mapping it with a database

警告

确保 :ref:’添加一个 CNAME 记录<域名/cname>’ 到域名的 DNS 之前 将您的域名与 Odoo 数据库进行映射。

如果不这样做,可能会妨碍验证 :ref:SSL 证书<域名/ssl>,并导致 证书名称不匹配 错误。这通常由 Web 浏览器显示为警告,例如 “您的连接不是专用的”

如果是这种情况,并且您在不到五天前已将域名添加到数据库的设置中,请等待 24 小时,因为验证可能仍会发生。否则,请“提交支持票证<https://www.odoo.com/help>”_,包括您的CNAME记录的屏幕截图。

SSL 加密(HTTPS 协议)

**SSL 加密 **一种基于加密的互联网安全协议。它允许您的访问者通过安全连接浏览您的网站,该连接在您的网址开头显示为“https://”协议,而不是不安全的“http://”协议。

Odoo为每个域生成一个单独的SSL证书:ref:’在数据库管理器中映射<域名/db-map>“,使用与”让我们加密证书颁发机构和ACME协议<https://letsencrypt.org/how-it-works/>“_的集成。

注解

  • 证书生成最多可能需要 24 小时。

  • 在数据库设置中添加域名后的五天内,会多次尝试验证证书。

  • 如果您已经在使用其他服务,则可以继续使用它或简单地更改为Odoo。

数据库的 Web 基本 URL

数据库** Web基本URL ** **URL **影响您的主网站地址以及发送给客户的所有链接(例如,报价,门户链接等)。

要对其进行配置,请使用您的自定义地址访问您的Odoo数据库,然后从登录屏幕以数据库管理员身份(*设置*组中的任何用户)登录。

警告

使用原始Odoo子域地址(例如,“example.odoo.com”)连接到数据库也会更新数据库的Web基本URL。请参阅下文,防止这些自动更新。

或者,您可以手动执行此操作。为此,请激活 :ref:开发人员模式 <developer-mode>,然后转到 :menuselection:Settings --> Technical --> System Parameters。</developer-mode>

找到名为“web.base.url”的密钥(如果不存在,则创建它),然后输入网站的完整地址作为值,例如“https://www.example.com”。

注解

URL 必须包含协议“https://”(或“http://”),并且不得以斜杠 (“/”) 结尾。

要防止在管理员登录数据库时自动更新 Web 基本 URL,可以创建以下系统参数:

  • key: web.base.url.freeze

  • 值:“真`

将您的域名与您的网站进行映射

将您的域名映射到您的网站与将其映射到数据库不同:

  • 它将您的域名定义为您网站的主要域名,帮助搜索引擎正确索引您的网站。

  • 如果您有多个网站,它会将您的域名与相应的网站进行映射。

转到:menuselection:网站 --> 配置 -->设置 --> 网站信息。如果您有多个网站,请选择要配置的网站。

在:guilabel:Domain`字段中,填写您网站的网址(例如,``https://www.example.com`),然后单击:guilabel:Save

Configuring https://www.example.com as the Domain of the website

警告

将您的域名与Odoo网站进行映射可防止Google将您的自定义域名“www.example.com”和原始odoo数据库地址“example.odoo.com”编入索引。

If both addresses are already indexed, it may take some time before Google removes the indexation of the second address. You may also try using the Google Search Console to fix this.