{"id":7153,"date":"2021-11-19T10:04:27","date_gmt":"2021-11-19T10:04:27","guid":{"rendered":"https:\/\/www.bodhost.com\/kb\/?p=7153"},"modified":"2026-02-26T14:03:07","modified_gmt":"2026-02-26T14:03:07","slug":"how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh","status":"publish","type":"post","link":"https:\/\/www.bodhost.com\/kb\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\/","title":{"rendered":"How can you change the hostname in cPanel Web Host Through SSH?"},"content":{"rendered":"<p><strong><\/strong><\/p>\r\n<p>In this article, we will show you how to change your hostname using SSH. Normally, we will configure the hostname of a system during the installation process. Many people are unconcerned about this and do not change the hostname, even if it was set to something ridiculous by the data center that installed the system.<\/p>\r\n\r\n\r\n\r\n\r\n\r\n<p>Change The Hostname Through SSH<\/p>\r\n\r\n\r\n\r\n<p>On any Linux system, we can change the hostname with the simple command &#8216;hostname&#8217;. Here&#8217;s an example of how to use the command line quickly.<\/p>\r\n\r\n\r\n\r\n<p>Using SSH, log into your cPanel and run the commands below.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-verse\">hostname\u00a0<\/pre>\r\n\r\n\r\n\r\n<p>It will return the system&#8217;s current hostname if no parameters given.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-verse\">hostname --fdqn<\/pre>\r\n\r\n\r\n\r\n<p>It will return the system&#8217;s fully eligible domain name.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-verse\">hostname server.yourdomain.com<\/pre>\r\n\r\n\r\n\r\n<p>It will change the system&#8217;s hostname to the new name.<\/p>\r\n\r\n\r\n\r\n<p>The key must now resynchronized with the cPanel licensing server.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>\/usr\/local\/cpanel\/cpkeyclt\u00a0<\/code><\/pre>\r\n\r\n\r\n\r\n<p>We sincerely hope that you now have a good understanding of How can you change the hostname in cPanel Web Host Through SSH or how to change the hostname in cPanel Web Host with cPanel, click here. If you continue to have problems with the protocol outlined above,\u00a0<span style=\"box-sizing: border-box;\">don&#8217;t hesitate to contact the <a href=\"https:\/\/www.bodhost.com\/\" target=\"_blank\" rel=\"noopener\">bodhost.com<\/a> Team<\/span>\u00a0for constructive assistance 24&#215;7.<\/p>\r\n<p>Learn to safely <a href=\"https:\/\/www.bodhost.com\/kb\/how-to-restart-a-linux-system-using-the-reboot-command-via-ssh\/\" target=\"_blank\" rel=\"noopener\">How to Restart a Linux System using the reboot Command via SSH<\/a><\/p>\r\n<p><strong><\/strong><\/p>","protected":false},"excerpt":{"rendered":"<p>In this article, we will show you how to change your hostname using SSH. Normally, we will configure the hostname of a system during the installation process. Many people are&hellip;<\/p>\n<p><a href=\"https:\/\/www.bodhost.com\/kb\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\/\" class=\"more-link\">Read More<\/a><\/p>\n","protected":false},"author":22,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[830],"tags":[193,979,194],"class_list":["post-7153","post","type-post","status-publish","format-standard","hentry","category-cpanel","tag-cpanel","tag-hostname-in-cpanel","tag-whm"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How can you change the hostname in cPanel Web Host Through SSH?<\/title>\n<meta name=\"description\" content=\"We have explained how do you change the hostname in cPanel Web Host Via SSH. Visit our website www.bodhost.com\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.bodhost.com\/kb\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How can you change the hostname in cPanel Web Host Through SSH?\" \/>\n<meta property=\"og:description\" content=\"We have explained how do you change the hostname in cPanel Web Host Via SSH. Visit our website www.bodhost.com\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bodhost.com\/kb\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - bodHOST\" \/>\n<meta property=\"article:published_time\" content=\"2021-11-19T10:04:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T14:03:07+00:00\" \/>\n<meta name=\"author\" content=\"Vincer\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vincer\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\\\/\"},\"author\":{\"name\":\"Vincer\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/f3852d74aeac480763235276b5faddd0\"},\"headline\":\"How can you change the hostname in cPanel Web Host Through SSH?\",\"datePublished\":\"2021-11-19T10:04:27+00:00\",\"dateModified\":\"2026-02-26T14:03:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\\\/\"},\"wordCount\":228,\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"keywords\":[\"cPanel\",\"hostname in cPanel\",\"WHM\"],\"articleSection\":[\"cPanel\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\\\/\",\"name\":\"How can you change the hostname in cPanel Web Host Through SSH?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\"},\"datePublished\":\"2021-11-19T10:04:27+00:00\",\"dateModified\":\"2026-02-26T14:03:07+00:00\",\"description\":\"We have explained how do you change the hostname in cPanel Web Host Via SSH. Visit our website www.bodhost.com\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"cPanel\",\"item\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/category\\\/cpanel\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How can you change the hostname in cPanel Web Host Through SSH?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"alternateName\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"contentUrl\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"width\":240,\"height\":240,\"caption\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/f3852d74aeac480763235276b5faddd0\",\"name\":\"Vincer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bb5079f76e01aaa97b2ffcb7a562292482693b395aba4a4214c98f006c07d352?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bb5079f76e01aaa97b2ffcb7a562292482693b395aba4a4214c98f006c07d352?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bb5079f76e01aaa97b2ffcb7a562292482693b395aba4a4214c98f006c07d352?s=96&d=mm&r=g\",\"caption\":\"Vincer\"},\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/author\\\/vinayak\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How can you change the hostname in cPanel Web Host Through SSH?","description":"We have explained how do you change the hostname in cPanel Web Host Via SSH. Visit our website www.bodhost.com","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.bodhost.com\/kb\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\/","og_locale":"en_US","og_type":"article","og_title":"How can you change the hostname in cPanel Web Host Through SSH?","og_description":"We have explained how do you change the hostname in cPanel Web Host Via SSH. Visit our website www.bodhost.com","og_url":"https:\/\/www.bodhost.com\/kb\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\/","og_site_name":"Knowledge Base - bodHOST","article_published_time":"2021-11-19T10:04:27+00:00","article_modified_time":"2026-02-26T14:03:07+00:00","author":"Vincer","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Vincer","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bodhost.com\/kb\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\/#article","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\/"},"author":{"name":"Vincer","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/f3852d74aeac480763235276b5faddd0"},"headline":"How can you change the hostname in cPanel Web Host Through SSH?","datePublished":"2021-11-19T10:04:27+00:00","dateModified":"2026-02-26T14:03:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bodhost.com\/kb\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\/"},"wordCount":228,"publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"keywords":["cPanel","hostname in cPanel","WHM"],"articleSection":["cPanel"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.bodhost.com\/kb\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\/","url":"https:\/\/www.bodhost.com\/kb\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\/","name":"How can you change the hostname in cPanel Web Host Through SSH?","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/#website"},"datePublished":"2021-11-19T10:04:27+00:00","dateModified":"2026-02-26T14:03:07+00:00","description":"We have explained how do you change the hostname in cPanel Web Host Via SSH. Visit our website www.bodhost.com","breadcrumb":{"@id":"https:\/\/www.bodhost.com\/kb\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bodhost.com\/kb\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.bodhost.com\/kb\/how-can-you-change-the-hostname-in-cpanel-web-host-through-ssh\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"cPanel","item":"https:\/\/www.bodhost.com\/kb\/category\/cpanel\/"},{"@type":"ListItem","position":2,"name":"How can you change the hostname in cPanel Web Host Through SSH?"}]},{"@type":"WebSite","@id":"https:\/\/www.bodhost.com\/kb\/#website","url":"https:\/\/www.bodhost.com\/kb\/","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","description":"","publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"alternateName":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bodhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.bodhost.com\/kb\/#organization","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","url":"https:\/\/www.bodhost.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","contentUrl":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","width":240,"height":240,"caption":"Web Hosting Knowledge Base | bodHOST Hosting FAQ"},"image":{"@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/f3852d74aeac480763235276b5faddd0","name":"Vincer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/bb5079f76e01aaa97b2ffcb7a562292482693b395aba4a4214c98f006c07d352?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/bb5079f76e01aaa97b2ffcb7a562292482693b395aba4a4214c98f006c07d352?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bb5079f76e01aaa97b2ffcb7a562292482693b395aba4a4214c98f006c07d352?s=96&d=mm&r=g","caption":"Vincer"},"url":"https:\/\/www.bodhost.com\/kb\/author\/vinayak\/"}]}},"_links":{"self":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/7153","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/comments?post=7153"}],"version-history":[{"count":10,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/7153\/revisions"}],"predecessor-version":[{"id":13392,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/7153\/revisions\/13392"}],"wp:attachment":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/media?parent=7153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/categories?post=7153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/tags?post=7153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}