{"id":22,"date":"2023-03-23T10:14:02","date_gmt":"2023-03-23T10:14:02","guid":{"rendered":"https:\/\/blog.herohosty.com\/?p=22"},"modified":"2026-10-11T17:41:47","modified_gmt":"2026-10-11T17:41:47","slug":"how-to-change-domain-on-hosting","status":"publish","type":"post","link":"https:\/\/herohosty.com\/blog\/how-to-change-domain-on-hosting\/","title":{"rendered":"How to Change Primary Domain Name in cPanel &#038; Web Hosting (2026 Step-by-Step Guide)"},"content":{"rendered":"<div class=\"blog-article-wrapper\" style=\"line-height: 1.8; font-size: 16px; color: #2d3748;\">\n<div class=\"hh-guides-nav-card\">\n<div class=\"hh-guides-nav-header\">\n        <span>\ud83d\udd04<\/span><br \/>\n        <span>cPanel Domain &amp; Infrastructure Hub (2026 Guides):<\/span>\n    <\/div>\n<div class=\"hh-guides-nav-list\">\n        <a href=\"https:\/\/herohosty.com\/blog\/how-to-change-domain-on-hosting\/\" class=\"hh-guide-chip\">\ud83d\udd04 Change Primary Domain \u2192<\/a><br \/>\n        <a href=\"https:\/\/herohosty.com\/blog\/what-is-the-herohosty-nameserver\/\" class=\"hh-guide-chip\">\ud83c\udf10 Nameservers &amp; DNS Guide \u2192<\/a><br \/>\n        <a href=\"https:\/\/herohosty.com\/blog\/how-to-install-ssl-on-herohosty\/\" class=\"hh-guide-chip\">\ud83d\udd12 Install Free SSL Certificate \u2192<\/a><br \/>\n        <a href=\"https:\/\/herohosty.com\/blog\/steps-to-sub-domain-creation-through-cpanel\/\" class=\"hh-guide-chip\">\ud83d\udcc1 Create cPanel Subdomain \u2192<\/a><br \/>\n        <a href=\"https:\/\/herohosty.com\/blog\/how-to-change-cpanel-password\/\" class=\"hh-guide-chip\">\ud83d\udd11 Change cPanel Password \u2192<\/a>\n    <\/div>\n<\/div>\n<p class=\"lead\" style=\"font-size: 18px; color: #1a202c; font-weight: 500;\">Whether you are rebranding your business, upgrading to a shorter <code>.com<\/code> or country-code domain extension, or fixing a typo made during registration, there comes a time when you need to <strong>change the primary domain name<\/strong> associated with your web hosting account.<\/p>\n<p>Because your primary domain in cPanel is directly bound to your <code>public_html<\/code> document root, your email inboxes, SSL certificates, and database site URLs, changing it must be done carefully to prevent broken links, email delivery failures, or 404 errors.<\/p>\n<p>In this 2026 step-by-step guide, you will learn the exact methods to change your primary hosting domain name smoothly without losing your files, databases, or SEO equity.<\/p>\n<p><!-- Caution Warning Box --><\/p>\n<div style=\"background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%); border: 1px solid #fed7aa; border-left: 5px solid #ea580c; border-radius: 10px; padding: 22px; margin: 28px 0;\">\n<div style=\"display: flex; align-items: center; gap: 10px; margin-bottom: 8px;\">\n        <span style=\"font-size: 22px;\">\u26a0\ufe0f<\/span><\/p>\n<h3 style=\"margin: 0; font-size: 18px; color: #9a3412; font-weight: 700;\">Important Pre-Change Checklist:<\/h3>\n<\/p><\/div>\n<ul style=\"margin: 0; padding-left: 20px; font-size: 15px; color: #7c2d12; line-height: 1.8;\">\n<li><strong>Take a Full cPanel Backup First:<\/strong> Go to cPanel &rarr; Backup Wizard and download a full backup archive of your site and MySQL databases.<\/li>\n<li><strong>Register &amp; Point New Domain:<\/strong> Ensure your new domain is registered and pointed to HeroHosty&#8217;s nameservers (<code>ns1.herohosty.xyz<\/code> &amp; <code>ns2.herohosty.xyz<\/code>).<\/li>\n<li><strong>Email Account Migration:<\/strong> Changing the primary domain changes the domain part of your email inboxes (e.g., <code>contact@old.com<\/code> becomes <code>contact@new.com<\/code>).<\/li>\n<\/ul>\n<\/div>\n<h2 style=\"font-size: 24px; color: #1a202c; margin-top: 36px; margin-bottom: 16px; font-weight: 700;\">Method 1: Change Primary Domain via HeroHosty Client Area (Instant)<\/h2>\n<p>On HeroHosty, users can request an instant primary domain modification directly from their billing dashboard without needing to recreate their hosting account:<\/p>\n<div style=\"background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 22px; margin: 20px 0; box-shadow: 0 1px 3px rgba(0,0,0,0.04);\">\n<ol style=\"padding-left: 20px; margin: 0; font-size: 15px; color: #334155; line-height: 1.9;\">\n<li>Log in to the <a href=\"https:\/\/herohosty.com\/clientarea\/\" style=\"color: #2563eb; font-weight: 600;\">HeroHosty Client Area<\/a>.<\/li>\n<li>Go to <strong>Services &rarr; My Services<\/strong> and click on your active hosting package.<\/li>\n<li>Under the <strong>Actions<\/strong> menu on the left sidebar, select <strong>Change Domain<\/strong> or open a quick 1-click ticket to our 24\/7 technical team specifying:\n<ul style=\"margin: 6px 0; padding-left: 20px;\">\n<li>Your current domain: <code>olddomain.com<\/code><\/li>\n<li>Your requested new primary domain: <code>newdomain.com<\/code><\/li>\n<\/ul>\n<\/li>\n<li>Our automated systems update your cPanel virtual host file, pointing your new domain directly to <code>public_html<\/code> in under 5 minutes without touching your existing website files!<\/li>\n<\/ol>\n<\/div>\n<h2 style=\"font-size: 24px; color: #1a202c; margin-top: 36px; margin-bottom: 16px; font-weight: 700;\">Method 2: Using cPanel Addon Domains (Alternative Multi-Site Approach)<\/h2>\n<p>If you are on HeroHosty&#8217;s <strong>Business<\/strong> or <strong>Premium<\/strong> shared plan (which supports multiple websites), you do not necessarily need to replace your primary domain. You can simply add your new domain as an <strong>Addon Domain<\/strong>:<\/p>\n<div style=\"background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 22px; margin: 20px 0; box-shadow: 0 1px 3px rgba(0,0,0,0.04);\">\n<ol style=\"padding-left: 20px; margin: 0; font-size: 15px; color: #334155; line-height: 1.9;\">\n<li>Log in to your cPanel dashboard.<\/li>\n<li>Navigate to <strong>Domains &rarr; Domains<\/strong> and click <strong>Create A New Domain<\/strong>.<\/li>\n<li>Enter your new domain name (e.g., <code>newdomain.com<\/code>).<\/li>\n<li>Uncheck <em>&#8220;Share document root&#8221;<\/em> if you want a separate website, or keep it checked if you want the new domain to serve the exact same files as your primary domain.<\/li>\n<li>Click <strong>Submit<\/strong>. Your new domain is instantly active!<\/li>\n<\/ol>\n<\/div>\n<h2 style=\"font-size: 24px; color: #1a202c; margin-top: 36px; margin-bottom: 16px; font-weight: 700;\">Step 3: Update WordPress Site URL &amp; Database (Post-Change)<\/h2>\n<p>If your website is built on WordPress, changing the server domain alone is not enough; WordPress hard-codes the site URL in its database. To prevent redirection loops or stylesheet breaking, update your database as follows:<\/p>\n<h3 style=\"font-size: 18px; color: #1e293b; margin-top: 24px; margin-bottom: 10px; font-weight: 700;\">Option A: Quick Temporary Fix in wp-config.php<\/h3>\n<p>Open cPanel <strong>File Manager<\/strong>, locate <code>public_html\/wp-config.php<\/code>, click Edit, and add these two lines above <em>&#8220;\/* That&#8217;s all, stop editing! *\/&#8221;<\/em>:<\/p>\n<pre style=\"background: #0f172a; color: #f8fafc; padding: 18px; border-radius: 8px; font-size: 14px; overflow-x: auto; line-height: 1.6;\"><code>define( 'WP_HOME', 'https:\/\/newdomain.com' );\ndefine( 'WP_SITEURL', 'https:\/\/newdomain.com' );<\/code><\/pre>\n<h3 style=\"font-size: 18px; color: #1e293b; margin-top: 24px; margin-bottom: 10px; font-weight: 700;\">Option B: Permanent Database Update via phpMyAdmin<\/h3>\n<ol style=\"padding-left: 20px; font-size: 15px; color: #334155; line-height: 1.8;\">\n<li>In cPanel, click on <strong>phpMyAdmin<\/strong> under Databases.<\/li>\n<li>Select your website&#8217;s database, then click on the <code>wp_options<\/code> table.<\/li>\n<li>Locate the <code>siteurl<\/code> and <code>home<\/code> rows (usually rows 1 and 2). Click <strong>Edit<\/strong> and replace <code>olddomain.com<\/code> with <code>newdomain.com<\/code>.<\/li>\n<\/ol>\n<h2 style=\"font-size: 24px; color: #1a202c; margin-top: 36px; margin-bottom: 16px; font-weight: 700;\">Step 4: Preserve SEO with a 301 Permanent Redirect<\/h2>\n<p>To avoid losing your existing Google rankings and backlinks from your old domain, set up a permanent 301 redirect. Add this code to the <code>.htaccess<\/code> file of your old domain:<\/p>\n<pre style=\"background: #0f172a; color: #f8fafc; padding: 18px; border-radius: 8px; font-size: 14px; overflow-x: auto; line-height: 1.6;\"><code>RewriteEngine On\nRewriteCond %{HTTP_HOST} ^(?:www\\.)?olddomain\\.com$ [NC]\nRewriteRule ^(.*)$ https:\/\/newdomain.com\/$1 [L,R=301]<\/code><\/pre>\n<h2 style=\"font-size: 24px; color: #1a202c; margin-top: 36px; margin-bottom: 20px; font-weight: 700;\">Recommended Web Hosting Plans for Multiple Domains<\/h2>\n<div class=\"hh-plans-stack\">\n    <!-- Single Plan --><\/p>\n<div class=\"hh-plan-row\">\n<div class=\"hh-plan-info\">\n<h3 class=\"hh-plan-title\">Single Shared Hosting<\/h3>\n<p class=\"hh-plan-sub\">Ideal for personal blogs, starter sites, and portfolios.<\/p>\n<div class=\"hh-plan-specs\">\n                <span class=\"hh-plan-spec-item\"><span class=\"hh-spec-check\">\u2713<\/span> 1 Website<\/span><br \/>\n                <span class=\"hh-plan-spec-item\"><span class=\"hh-spec-check\">\u2713<\/span> 10 GB Enterprise NVMe<\/span><br \/>\n                <span class=\"hh-plan-spec-item\"><span class=\"hh-spec-check\">\u2713<\/span> Unmetered Bandwidth<\/span><br \/>\n                <span class=\"hh-plan-spec-item\"><span class=\"hh-spec-check\">\u2713<\/span> Free SSL &amp; cPanel<\/span>\n            <\/div>\n<\/p><\/div>\n<div class=\"hh-plan-side\">\n<div class=\"hh-plan-price-wrap\"><span class=\"hh-plan-price\">\u20ac0.97<\/span> <span class=\"hh-plan-period\">\/month<\/span><\/div>\n<p>            <a href=\"https:\/\/herohosty.com\/clientarea\/cart.php?a=add&#038;pid=104&#038;currency=5\" class=\"hh-btn-order hh-btn-dark\" style=\"background: #0f172a !important; color: #ffffff !important; text-decoration: none !important;\">Deploy Single Plan \u2192<\/a>\n        <\/div>\n<\/p><\/div>\n<p>    <!-- Business Plan (Featured) --><\/p>\n<div class=\"hh-plan-row featured\">\n        <span class=\"hh-plan-badge\">\ud83d\udd25 MOST POPULAR \u2022 RECOMMENDED<\/span><\/p>\n<div class=\"hh-plan-info\">\n<h3 class=\"hh-plan-title\">Business Shared Hosting<\/h3>\n<p class=\"hh-plan-sub\">Designed for growing businesses, WordPress, &amp; e-commerce.<\/p>\n<div class=\"hh-plan-specs\">\n                <span class=\"hh-plan-spec-item\"><span class=\"hh-spec-check\">\u2713<\/span> Up to 5 Websites<\/span><br \/>\n                <span class=\"hh-plan-spec-item\"><span class=\"hh-spec-check\">\u2713<\/span> Unlimited NVMe SSD<\/span><br \/>\n                <span class=\"hh-plan-spec-item\"><span class=\"hh-spec-check\">\u2713<\/span> 2 CPU Cores &amp; 4 GB RAM<\/span><br \/>\n                <span class=\"hh-plan-spec-item\"><span class=\"hh-spec-check\">\u2713<\/span> LiteSpeed Turbo Caching<\/span>\n            <\/div>\n<\/p><\/div>\n<div class=\"hh-plan-side\">\n<div class=\"hh-plan-price-wrap\"><span class=\"hh-plan-price\">\u20ac1.95<\/span> <span class=\"hh-plan-period\">\/month<\/span><\/div>\n<p>            <a href=\"https:\/\/herohosty.com\/clientarea\/cart.php?a=add&#038;pid=105&#038;currency=5\" class=\"hh-btn-order hh-btn-orange\" style=\"background: #ff6b00 !important; color: #ffffff !important; text-decoration: none !important;\">Deploy Business Plan \u2192<\/a>\n        <\/div>\n<\/p><\/div>\n<p>    <!-- Premium Plan --><\/p>\n<div class=\"hh-plan-row\">\n<div class=\"hh-plan-info\">\n<h3 class=\"hh-plan-title\">Premium Shared Hosting<\/h3>\n<p class=\"hh-plan-sub\">Max performance for web agencies and high-traffic portals.<\/p>\n<div class=\"hh-plan-specs\">\n                <span class=\"hh-plan-spec-item\"><span class=\"hh-spec-check\">\u2713<\/span> Unlimited Websites<\/span><br \/>\n                <span class=\"hh-plan-spec-item\"><span class=\"hh-spec-check\">\u2713<\/span> Unlimited NVMe SSD<\/span><br \/>\n                <span class=\"hh-plan-spec-item\"><span class=\"hh-spec-check\">\u2713<\/span> 3 CPU Cores &amp; 6 GB RAM<\/span><br \/>\n                <span class=\"hh-plan-spec-item\"><span class=\"hh-spec-check\">\u2713<\/span> VIP 24\/7 Support &amp; Backups<\/span>\n            <\/div>\n<\/p><\/div>\n<div class=\"hh-plan-side\">\n<div class=\"hh-plan-price-wrap\"><span class=\"hh-plan-price\">\u20ac2.93<\/span> <span class=\"hh-plan-period\">\/month<\/span><\/div>\n<p>            <a href=\"https:\/\/herohosty.com\/clientarea\/cart.php?a=add&#038;pid=106&#038;currency=5\" class=\"hh-btn-order hh-btn-dark\" style=\"background: #0f172a !important; color: #ffffff !important; text-decoration: none !important;\">Deploy Premium Plan \u2192<\/a>\n        <\/div>\n<\/p><\/div>\n<\/div>\n<h2 style=\"font-size: 24px; color: #1a202c; margin-top: 36px; margin-bottom: 16px; font-weight: 700;\">Frequently Asked Questions (FAQ) : Changing Domain on Hosting<\/h2>\n<div class=\"hh-faq-accordion\" style=\"margin: 24px 0;\">\n<div style=\"background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.04);\">\n<h3 style=\"font-size: 17px; color: #1e293b; margin: 0 0 8px 0; font-weight: 700;\">1. Will changing my primary domain delete my website files?<\/h3>\n<p style=\"font-size: 15px; color: #475569; margin: 0; line-height: 1.7;\">No. Your files stored in <code>public_html<\/code> and your MySQL databases remain completely untouched. Only the domain mapping in the server&#8217;s virtual host configuration is modified.<\/p>\n<\/p><\/div>\n<div style=\"background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.04);\">\n<h3 style=\"font-size: 17px; color: #1e293b; margin: 0 0 8px 0; font-weight: 700;\">2. How long does the domain change take to take effect?<\/h3>\n<p style=\"font-size: 15px; color: #475569; margin: 0; line-height: 1.7;\">On the server side, the change is instant. However, because DNS nameservers must propagate globally, it typically takes 15 minutes to 2 hours for visitors worldwide to see the update.<\/p>\n<\/p><\/div>\n<div style=\"background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.04);\">\n<h3 style=\"font-size: 17px; color: #1e293b; margin: 0 0 8px 0; font-weight: 700;\">3. What happens to my old email accounts?<\/h3>\n<p style=\"font-size: 15px; color: #475569; margin: 0; line-height: 1.7;\">When the primary domain changes, email accounts associated with that domain change to the new domain extension. You should recreate necessary forwarding rules or alias routes for the old domain.<\/p>\n<\/p><\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udd04 cPanel Domain &amp; Infrastructure Hub (2026 Guides): \ud83d\udd04 Change Primary Domain \u2192 \ud83c\udf10 Nameservers &amp; DNS Guide \u2192 \ud83d\udd12 Install Free SSL Certificate \u2192 \ud83d\udcc1 Create cPanel Subdomain \u2192 \ud83d\udd11 Change cPanel Password \u2192 Whether you are rebranding your business, upgrading to a shorter .com or country-code domain extension, or fixing a typo made <a href=\"https:\/\/herohosty.com\/blog\/how-to-change-domain-on-hosting\/\" class=\"more-link\">&#8230;<span class=\"screen-reader-text\">  How to Change Primary Domain Name in cPanel &#038; Web Hosting (2026 Step-by-Step Guide)<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":272,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,9],"tags":[6,5],"class_list":["post-22","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","category-web-hosting-guides","tag-domain","tag-hosting"],"_links":{"self":[{"href":"https:\/\/herohosty.com\/blog\/wp-json\/wp\/v2\/posts\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/herohosty.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/herohosty.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/herohosty.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/herohosty.com\/blog\/wp-json\/wp\/v2\/comments?post=22"}],"version-history":[{"count":9,"href":"https:\/\/herohosty.com\/blog\/wp-json\/wp\/v2\/posts\/22\/revisions"}],"predecessor-version":[{"id":273,"href":"https:\/\/herohosty.com\/blog\/wp-json\/wp\/v2\/posts\/22\/revisions\/273"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/herohosty.com\/blog\/wp-json\/wp\/v2\/media\/272"}],"wp:attachment":[{"href":"https:\/\/herohosty.com\/blog\/wp-json\/wp\/v2\/media?parent=22"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/herohosty.com\/blog\/wp-json\/wp\/v2\/categories?post=22"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/herohosty.com\/blog\/wp-json\/wp\/v2\/tags?post=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}