{"id":1525,"date":"2022-07-06T12:30:13","date_gmt":"2022-07-06T12:30:13","guid":{"rendered":"https:\/\/pheonixsolutions.com\/knowledge-base\/?p=1525"},"modified":"2026-06-02T18:06:33","modified_gmt":"2026-06-02T18:06:33","slug":"how-to-update-your-hostname-before-cpanel-is-installed","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/06\/how-to-update-your-hostname-before-cpanel-is-installed\/","title":{"rendered":"How-To Update Your Hostname Before cPanel Is Installed."},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>A hostname is the unique name that identifies your server on a network (for example: <code>server1.yourdomain.com<\/code>). Before installing cPanel, it is very important to set a proper Fully Qualified Domain Name (FQDN) hostname.<\/p>\n\n\n\n<p>cPanel strictly checks the hostname during installation. If it is not correctly configured, installation may fail or later cause mail\/DNS issues.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>Before changing the hostname, ensure you have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Root access to the server (SSH login)<\/li>\n\n\n\n<li>A valid domain name (e.g., <code>yourdomain.com<\/code>)<\/li>\n\n\n\n<li>A properly created <strong>A record<\/strong> pointing hostname \u2192 server IP<\/li>\n\n\n\n<li>Example:\n<ul class=\"wp-block-list\">\n<li><code>server1.yourdomain.com \u2192 YOUR_SERVER_IP<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">IMPLEMENTATION<\/h2>\n\n\n\n<p>When installing cPanel to your new server, a check is performed to see if an FQDN (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Fully_qualified_domain_name\">fully-qualified domain name<\/a>) is set up as the hostname. If this hostname is not valid, the installation will fail at that point.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Your hostname (mycpanel.hostname) is invalid, and must be \nset to a fully qualified domain name before installing cPanel. \n\nA fully qualified domain name must contain two dots, and consists of two parts: the hostname and the domain name. \nYou can update your hostname by running `hostname your-hostname.example.com`, then re-running the installer. \n********************* ERROR ********************* \nExiting...\n<\/pre>\n\n\n\n<p>You can update the hostname through a couple of different methods through the command line, but the following directions are to use &#8216;hostnamectl,&#8217; which is available for the majority of the OSes cPanel Supports.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Procedure<\/h3>\n\n\n\n<p>You can verify your current hostname by running the hostname command:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">~# hostname\nmycpanel.hostname\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ftoc-heading-4\">Step 1: Use set-hostname to Change the Hostname<\/h3>\n\n\n\n<p>Type the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">hostnamectl set-hostname new-hostname\n\n<\/pre>\n\n\n\n<p>Be sure to use your own hostname choice instead of new-hostname<\/p>\n\n\n\n<p><strong>*Make sure the new hostname the requirements for an FQDN.<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/support.cpanel.net\/hc\/en-us\/articles\/360044460594\">Effective Hostname Usage With cPanel &amp; WHM<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ftoc-heading-5\">Step 2: Use hostnamectl to Confirm the Change<\/h3>\n\n\n\n<p>When the command is successful, &#8216;hostnamectl set-hostname does not produce any output.<\/p>\n\n\n\n<p>Therefore, use &#8216;hostnamectl&#8217;&nbsp;to check the result.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">~# hostnamectl\nStatic hostname: server.mycpanel.net\nIcon name: computer-vm\nChassis: vm\nMachine ID: 25e1cd57343e45ba9385a719b7233809\nBoot ID: f671cce601254c1f83d61a0007ed8cb6\nVirtualization: kvm\nOperating System: Ubuntu 20.04.2 LTS\nKernel: Linux 5.4.0-77-generic\nArchitecture: x86-64\n\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Setting the correct hostname before installing cPanel is a critical first step in server setup. A properly configured FQDN ensures smooth installation, avoids email delivery issues, and prevents DNS conflicts later.<\/p>\n\n\n\n<p>If you set the hostname correctly and ensure DNS resolution works, cPanel installation will proceed without errors.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction A hostname is the unique name that identifies your server on a network (for example: server1.yourdomain.com). Before installing cPanel, it is very important to set a proper Fully Qualified Domain Name (FQDN) hostname. cPanel strictly checks the hostname during installation. If it is not correctly configured, installation may fail or later cause mail\/DNS issues. ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/06\/how-to-update-your-hostname-before-cpanel-is-installed\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[33],"tags":[],"class_list":["post-1525","post","type-post","status-publish","format-standard","hentry","category-whm"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How-To Update Your Hostname Before cPanel Is Installed. - PheonixSolutions Knowledge-Base<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/06\/how-to-update-your-hostname-before-cpanel-is-installed\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How-To Update Your Hostname Before cPanel Is Installed. - PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"og:description\" content=\"Introduction A hostname is the unique name that identifies your server on a network (for example: server1.yourdomain.com). Before installing cPanel, it is very important to set a proper Fully Qualified Domain Name (FQDN) hostname. cPanel strictly checks the hostname during installation. If it is not correctly configured, installation may fail or later cause mail\/DNS issues. ..Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/06\/how-to-update-your-hostname-before-cpanel-is-installed\/\" \/>\n<meta property=\"og:site_name\" content=\"PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-06T12:30:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-02T18:06:33+00:00\" \/>\n<meta name=\"author\" content=\"vijender\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"vijender\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/06\\\/how-to-update-your-hostname-before-cpanel-is-installed\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/06\\\/how-to-update-your-hostname-before-cpanel-is-installed\\\/\"},\"author\":{\"name\":\"vijender\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/7e483f3adf4e0c18f959adcaf9ea3f3d\"},\"headline\":\"How-To Update Your Hostname Before cPanel Is Installed.\",\"datePublished\":\"2022-07-06T12:30:13+00:00\",\"dateModified\":\"2026-06-02T18:06:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/06\\\/how-to-update-your-hostname-before-cpanel-is-installed\\\/\"},\"wordCount\":296,\"commentCount\":0,\"articleSection\":[\"WHM\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/06\\\/how-to-update-your-hostname-before-cpanel-is-installed\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/06\\\/how-to-update-your-hostname-before-cpanel-is-installed\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/06\\\/how-to-update-your-hostname-before-cpanel-is-installed\\\/\",\"name\":\"How-To Update Your Hostname Before cPanel Is Installed. - PheonixSolutions Knowledge-Base\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\"},\"datePublished\":\"2022-07-06T12:30:13+00:00\",\"dateModified\":\"2026-06-02T18:06:33+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/7e483f3adf4e0c18f959adcaf9ea3f3d\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/06\\\/how-to-update-your-hostname-before-cpanel-is-installed\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/06\\\/how-to-update-your-hostname-before-cpanel-is-installed\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/06\\\/how-to-update-your-hostname-before-cpanel-is-installed\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How-To Update Your Hostname Before cPanel Is Installed.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\",\"name\":\"PheonixSolutions Knowledge-Base\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/7e483f3adf4e0c18f959adcaf9ea3f3d\",\"name\":\"vijender\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g\",\"caption\":\"vijender\"},\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/author\\\/vijender\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How-To Update Your Hostname Before cPanel Is Installed. - PheonixSolutions Knowledge-Base","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:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/06\/how-to-update-your-hostname-before-cpanel-is-installed\/","og_locale":"en_US","og_type":"article","og_title":"How-To Update Your Hostname Before cPanel Is Installed. - PheonixSolutions Knowledge-Base","og_description":"Introduction A hostname is the unique name that identifies your server on a network (for example: server1.yourdomain.com). Before installing cPanel, it is very important to set a proper Fully Qualified Domain Name (FQDN) hostname. cPanel strictly checks the hostname during installation. If it is not correctly configured, installation may fail or later cause mail\/DNS issues. ..Read more","og_url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/06\/how-to-update-your-hostname-before-cpanel-is-installed\/","og_site_name":"PheonixSolutions Knowledge-Base","article_published_time":"2022-07-06T12:30:13+00:00","article_modified_time":"2026-06-02T18:06:33+00:00","author":"vijender","twitter_card":"summary_large_image","twitter_misc":{"Written by":"vijender","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/06\/how-to-update-your-hostname-before-cpanel-is-installed\/#article","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/06\/how-to-update-your-hostname-before-cpanel-is-installed\/"},"author":{"name":"vijender","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/7e483f3adf4e0c18f959adcaf9ea3f3d"},"headline":"How-To Update Your Hostname Before cPanel Is Installed.","datePublished":"2022-07-06T12:30:13+00:00","dateModified":"2026-06-02T18:06:33+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/06\/how-to-update-your-hostname-before-cpanel-is-installed\/"},"wordCount":296,"commentCount":0,"articleSection":["WHM"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/06\/how-to-update-your-hostname-before-cpanel-is-installed\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/06\/how-to-update-your-hostname-before-cpanel-is-installed\/","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/06\/how-to-update-your-hostname-before-cpanel-is-installed\/","name":"How-To Update Your Hostname Before cPanel Is Installed. - PheonixSolutions Knowledge-Base","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website"},"datePublished":"2022-07-06T12:30:13+00:00","dateModified":"2026-06-02T18:06:33+00:00","author":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/7e483f3adf4e0c18f959adcaf9ea3f3d"},"breadcrumb":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/06\/how-to-update-your-hostname-before-cpanel-is-installed\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/06\/how-to-update-your-hostname-before-cpanel-is-installed\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/06\/how-to-update-your-hostname-before-cpanel-is-installed\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pheonixsolutions.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"How-To Update Your Hostname Before cPanel Is Installed."}]},{"@type":"WebSite","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/","name":"PheonixSolutions Knowledge-Base","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pheonixsolutions.com\/knowledge-base\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/7e483f3adf4e0c18f959adcaf9ea3f3d","name":"vijender","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g","caption":"vijender"},"url":"https:\/\/pheonixsolutions.com\/knowledge-base\/author\/vijender\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1525","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/comments?post=1525"}],"version-history":[{"count":3,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1525\/revisions"}],"predecessor-version":[{"id":3725,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1525\/revisions\/3725"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=1525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/categories?post=1525"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/tags?post=1525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}