Adding a domain
To add a domain you will need:
- Address of the domain on which the web application is running. You need access to the domain management interface to update the A record.
- (For HTTPS) Valid private key and TLS certificate for this domain in PEM
-encoded format. Certificates with RSA-2048 and RSA-4096 keys are supported. - (Optional) Valid private key and TLS certificate to secure the connection between the proxy server and the server hosting your web application.
-
In the management console
, select the folder. -
From the list of services, select Smart Web Security.
-
In the left-hand panel, select Domain security and select the proxy server you want to add a domain for.
-
In the left-hand menu, go to the
Domains tab and click Add domain. -
Enter the address of the domain your web application is in.
You can add a wildcard domain
, e.g.,*.example.com. In which case requests to all subdomains of the specified domain will be processed. -
Optionally, enter a domain description.
-
Click Continue.
-
Specify the protocol for your web application to communicate with its users as well as additional parameters:
-
HTTPS and HTTP: Encrypted HTTPS connection and HTTP support for rare use cases. For example, for a transition period or to support legacy equipment.
-
Optionally, enable Redirect HTTP to HTTPS to send HTTP requests over HTTPS.
-
Optionally, expand the Connection settings section and change the numbers of used ports and the HTTPS version.
By default, the HTTP/2 version, HTTP port
80, and HTTPS port443are used.
-
-
HTTPS: Encrypted HTTPS connection.
-
Optionally, expand the Connection settings section and change number of the used port and the HTTPS version.
By default, the HTTP/2 version and HTTPS port
443are used.
-
-
HTTP: Unencrypted connection. We recommend using it for test purposes only. You do not need a certificate for this option, but traffic between the user and your application will be transmitted in plain text.
-
Optionally, expand the Connection settings section and change the number of the used port.
HTTP port
80is used by default.
-
-
-
If using HTTPS, select a certificate from Certificate Manager issued for the specified domain or click Create and select:
-
Custom certificate: If your web application already has a TLS certificate.
- Enter a name and description for the certificate.
- Optionally, enable deletion protection to prevent the certificate from being deleted.
- Copy or upload the certificate, intermediate certificate chain, and your private key in PEM format.
- Click Create certificate.
-
Let's Encrypt certificate: If your web application does not have a TLS certificate.
-
Enter a name and description for the certificate.
-
Optionally, enable deletion protection to prevent the certificate from being deleted.
-
Click Create certificate. The interface will prompt you to create a CNAME resource record in the public DNS zone of your domain. You need this record to verify your domain rights.
Note
You can create the record manually or, if your domain is delegated to Yandex Cloud DNS, use this guide to automatically create a resource record.
Wait until your rights for the domain are confirmed. It usually takes a few minutes to complete the check.
-
To view the check status, click Show logs.
After the check status changes to
Valid, the certificate will be issued and its status will change toIssued. Until the certificate is issued, you will not be able to proceed with adding the domain.
-
-
-
Click Continue.
-
Under Target resources, set up the targets:
-
Enter the server IP address and port your web application runs on.
-
Optionally, enter a comment for the server.
-
Optionally, click Add resource to add connections to any additional targets.
-
Optionally, expand the Connect target resources section to configure additional connection settings:
- In the Protocol field, select the connection protocol,
HTTPSorHTTP. - Optionally, if you selected
HTTPSand have multiple domain names and certificates, in the SNI field, add a SNI handler to route traffic based on the domain name. - If you selected
HTTPS, upload the TLS certificate file. - Select the protocol version,
HTTP/2orHTTP/1.1.
- In the Protocol field, select the connection protocol,
-
-
Click Add domain.
After adding a domain create a security profile and connect it to the domain.