Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function checks whether the server supports SNI (Server Name Indication). SNI allows multiple SSL certificates to use a single IP address and port number.

Note:

In cPanel & WHM version 60 and later, Mail SNI is always enabled.

  • Functions that enable Mail SNI succeed with a warning that Mail SNI is always enabled.
  • Functions that disable Mail SNI fail and make no changes.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/is_sni_supported?api.version=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/is_sni_supported?api.version=1
 Command Line
whmapi1 is_sni_supported

Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
    "data": {
        "sni": 1
        }
    },
    "metadata": {
        "version": 1,
        "reason": "OK",
        "result": 1,
        "command": "is_sni_supported"
    }
}
 Output (XML)
<result> 
   <data>
      <sni>1</sni>
   </date>      
   <metadata>
      <version>1</version>
      <reason>OK</reason>
      <result>1</result>
      <command>is_sni_supported</command>
   </metadata>
 </result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

   

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
sniBooleanWhether the server supports SNI.
  • 1 — SNI supported.
  • 0 — SNI not supported.
1