Help

How to create a DNS record for successful SSL certificate generation

In the process of generating an SSL certificate, one of the important steps is to validate the domain. To do this, you need to create a DNS record on your DNS server. However, even at such a simple stage, errors can occur that will result in domain validation failing. In this article, we will look at how to create a correct DNS record for successful SSL certificate generation.

One of the common mistakes that clients make when generating an SSL certificate is incorrect formatting of the DNS record. Clients often forget to put a period at the end of the domain, which leads to duplication of the main domain in the record. For example, instead of the record "example.com." (with a period at the end) clients can write the record "example.com.com" (duplication of the main domain).

To avoid such errors, it is necessary to pay attention to the correct formatting of the DNS record. The correct record for the example.com domain looks like this:

_acme-challenge.example.com. IN CNAME some_other_domain.com.

Here, _acme-challenge is the prefix that is automatically generated when generating an SSL certificate, example.com. is the main domain, and IN and CNAME are the type and class of the record, respectively. some_other_domain.com. is the domain to which the record should point.

It is important to understand that the record type may differ depending on the type of certificate you want to create. In our example, we are using a CNAME record, but for other types of certificates, other types of records may be used.

If you are using a subdomain, the record will look like this:

www.example.com. IN CNAME example.com.

Here, www.example.com. is the subdomain for which we want to create a CNAME record, and example.com. is the domain to which the record should point. IN and CNAME are the type and class of the record, respectively.

Please note that the record must end with a period, and the subdomain and main domain should be separated by only one period. This is important for the proper functioning of the DNS server and the successful redirection of traffic to the desired domain.

Have more questions about Hosting?