Skip to main content

How to change domain extension without duplicating account

Comments

4 comments

  • lorio
    After the change I would need to make redirects from the old website urls to the new ones, and create the new email addresses @ domain.net

    Let's say you can change easily from .com to .net, how would you redirect? If com is removed from the account, you cannot redirect. The question is, what should happen to .com in the long run? If .com is not used on a different server or different context, you might just park .net on top of the .com account and do some redirecting. But it all depends on how the old domain will be used. If there is a complete separation, a different approach is needed.
    0
  • speedy200man
    I was thinking there is a procedure to change the main domain, and then add the .com as an addon domain and doredirects... Should I create a new one like a standard domain?
    0
  • speedy200man
    I managed to do it. These are the steps:
    • Make a full backup
    • Change the website URL in the database from .com to .net (for WP, you can find it in the _options table, usually first 2 records)
    • Login to WHM - list accounts - modify account - change the domain.com to domain.net (the username needs to remain the same as the previous one, even if you are changing the domain name). Attention: this will automatically modify dns records and change email from @domain.com to @domain.net - i will fix this in the next steps.
    • Add domain.com to add-on domains.
    • Login to cpanel account - regenerate Auto-SSL.
    • Go to domain redirects and create a permanent 301 redirect from the .com domain to the .net domain and check the wildcard redirect before hitting the Add button.
    • Go to email Forwarders and Add Domain Forwarder from domain.com to domain.net - this will forward emails that come to the old domain.
    • Login to the WP site, update permalinks and any hardcoded references to the old domain.
    • Just to be sure, insert a .htaccess rule to permanently redirect old urls to the correspondent new urls.
    RewriteEngine On RewriteCond %{HTTP_HOST} ^domain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.domain.com$ RewriteRule (.*)$ https://www.domain.net/$1 [R=301,L]
    And you're done! Cheers!
    0
  • cPanelLauren
    I managed to do it. These are the steps:
    • Make a full backup
    • Change the website URL in the database from .com to .net (for WP, you can find it in the _options table, usually first 2 records)
    • Login to WHM - list accounts - modify account - change the domain.com to domain.net (the username needs to remain the same as the previous one, even if you are changing the domain name). Attention: this will automatically modify dns records and change email from @domain.com to @domain.net - i will fix this in the next steps.
    • Add domain.com to add-on domains.
    • Login to cpanel account - regenerate Auto-SSL.
    • Go to domain redirects and create a permanent 301 redirect from the .com domain to the .net domain and check the wildcard redirect before hitting the Add button.
    • Go to email Forwarders and Add Domain Forwarder from domain.com to domain.net - this will forward emails that come to the old domain.
    • Login to the WP site, update permalinks and any hardcoded references to the old domain.
    • Just to be sure, insert a .htaccess rule to permanently redirect old urls to the correspondent new urls.
    RewriteEngine On RewriteCond %{HTTP_HOST} ^domain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.domain.com$ RewriteRule (.*)$ https://www.domain.net/$1 [R=301,L]
    And you're done! Cheers!

    This is exactly how you'd do this! Glad you were able to get it done, thanks for adding the steps that worked for you as well.
    0

Please sign in to leave a comment.