# Update server's primary virtual host This function sets the primary domain hosted on an IP address and web server port. The primary domain refers to the virtual host that the server returns when a visitor directly accesses the IP address. For example, if both and are name-based virtual hosts on IP address , the primary virtual host appears when the visitor accesses the location. When you disable the Web Server role, the system this function. Endpoint: GET /set_primary_servername Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `servername` (string, required) The value in Apache's section to set as primary for the IP address and port type. Example: "hostname.example.com" - `type` (string) The type of virtual host to set as primary. * — Set the primary domain for the HTTP port. Typically, port . * — Set the primary domain for the HTTPS port. Typically, port . Enum: "std", "ssl" ## Response 200 fields (application/json): - `metadata` (object) - `metadata.command` (string) The method name called. Example: "set_primary_servername" - `metadata.reason` (string) The reason the API function failed when the field is . This field may display a success message when a function succeeds. Example: "OK" - `metadata.result` (integer) * — Success. * — Failed. Check the field for more details. Enum: 0, 1 - `metadata.version` (integer) The version of the API function. Example: 1