Your own domain
You can use your own domain to publish a website, e.g., 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.
This option is available for buckets with a dot in their name, e.g.,
example.com
.Yandex Cloud DNSThird-party DNS serverWarning
Cloud DNS usage is chargeable; for more information, see Cloud DNS pricing policy.
-
In the management console
, select Object Storage from the list of services and go to the bucket you want to use your own domain for. -
In the left-hand panel, select
Settings and go to the Website tab. -
In Hosting, under Domains in Cloud DNS, click Create record.
Note
Under Domains in Cloud DNS in the Hosting section, you can see only those domains that were created through this interface. 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 parameters
DNS zone parameters:
- Zone:
example.com.
- Type:
Public
Resource record parameters:
Name Type TTL Value 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.