Server Name Indication (SNI) is a protocol that allows you to host multiple SSL-secured websites on a single IPv4 address.
In the past, every SSL certificate required its own dedicated IP address. Thanks to SNI, the server knows which hostname the client is connecting to during the handshake, allowing you to serve the correct certificate for each domain on the same IP.
Default Behavior:
In modern versions of DirectAdmin, SNI is enabled by default. You usually do not need to configure anything to use this feature.
In modern versions of DirectAdmin, SNI is enabled by default. You usually do not need to configure anything to use this feature.
Verifying SNI Support
If you want to be absolutely sure that SNI is active on your server, you can check the DirectAdmin configuration via SSH.
- Log in to your VPS via SSH as
root. - Run the following command to search for the setting:
/usr/local/directadmin/directadmin c | grep enable_ssl_sni
Interpreting the output
- enable_ssl_sni=1: SNI is enabled (Correct).
- enable_ssl_sni=0: SNI is disabled.
Enabling SNI (If disabled)
Only if the output above showed 0, you need to enable it manually.
- Open the configuration file:
nano /usr/local/directadmin/conf/directadmin.conf - Add or change the line:
enable_ssl_sni=1
- Save the file and restart DirectAdmin:
systemctl restart directadmin
How to use it?
Once SNI is active, you do not need to do anything special.
- Log in to DirectAdmin at User Level.
- Go to SSL Certificates.
- Select "Free & automatic certificate from Let's Encrypt" (or upload your own).
- It will work instantly, even if you are sharing the server's main IP address with other domains.