Your own domain
To publish a website, you can use your own domain, such as example.com
.
To support your own domain:
-
Create a bucket. Name it the same as your domain, e.g.,
example.com
. -
Configure the bucket as hosting.
-
On the DNS server, create a public DNS zone and a resource record to link your domain name to the bucket:
Yandex Cloud DNSThird-party DNS serverWarning
Cloud DNS usage is chargeable; for more information, see Cloud DNS pricing policy.
-
In the management console
, go to the bucket you want to use your own domain for. -
Go to the
Website tab. -
In Hosting, under Domains in Cloud DNS, click Create record.
Note
Only the domains created through this interface are displayed under Domains in Cloud DNS. If a record was created in Cloud DNS, it will not appear there.
-
In the window that opens, click Create zone and select the domain zone of the same name with the bucket, e.g.,
example.com.
. Click Create. -
Open Additional settings.
-
In the TTL (in seconds) field, specify the resource record time to live or select a value from the list.
-
Click Create.
-
Click Save.
To get access to public zone domain names, delegate the domain. To do this, specify these server addresses in your online account with domain registrar:
ns1.yandexcloud.net
andns2.yandexcloud.net
.It may take some time to delegate the domain and update the resource records.
You can also create a DNS zone and resource record using Cloud DNS.
Example of DNS zone and resource record parametersDNS zone parameters:
- Zone:
example.com.
- Type:
Public
Resource record parameters:
Name Type TTL Data example.com. ANAME 600 example.com.website.yandexcloud.net ANAME records allow second-level domains to be used for hosting. Unlike CNAME records, they do not restrict the use of other record types in the same zone.
Example of DNS zone parameters:
- Zone:
example.com.
- Type:
Public
CNAME resource record example:
example.com CNAME example.com.website.yandexcloud.net
To use a CNAME resource record, make sure your domain name belongs to at least a third-level domain. This has to do with how CNAME records are processed on DNS hosting. For more information, see section 2.4 of RFC 1912
.Updating the resource records may take some time.
-
-
To make your website available over HTTPS:
-
(Optional) Add your own certificate to Certificate Manager or issue a free-of-charge Let's Encrypt certificate.
Note
Certificate Manager usage is free of charge; for more information, see Pricing for Yandex Certificate Manager.
-
Configure HTTPS by linking a certificate from Certificate Manager to your bucket or uploading your own.
Request redirects from HTTP to HTTPS are enabled automatically once you set up HTTPS access to a bucket. No other settings are required.
-
Once you have successfully completed all steps, the objects will be accessible through links in <domain_name>/<object_key>
format.