How do I change my domain name in Plesk?

Good news! Plesk makes it very straightforward to complete the actual change or rename of your domain name.

In some cases we’ve had to change domain names because there was simply a typo in the originally created account, in others it’s because the www. was included during creation when it shouldn’t have been, and finally other times it’s simply because of a change in focus mandated a new company/brand name.

One thing to bear in mind is that changing your domain in Plesk doesn’t change your registration of the name. This means that if the change you’re looking to complete is to alter it to a new name altogether, you’ll need to register the new domain name and ensure its name servers match those for your hosting plan along with the changes described below.

Option A: Simple Name Change

Important Notes:

  • This change will change all email accounts you have configured in Plesk to use the new domain. This means any mail apps you have configured to log in and sync your mail will need their usernames updated by replacing the old domain with the new one.
  • This change will change all subdomains to use the new domain as well. So if you’ve got mysub.domain.com and you change domain.com to newdomain.com, the subdomain automatically changes to mysub.newdomain.com.
 If you’re using a web application, like WordPress, and it’s not currently managed by 1-click web apps (Installatron), we suggest importing it into 1-click web apps before proceeding.

Change The Domain in Plesk

  1. Login to Plesk
  2. Find your domain name in the list and click the “Hosting Settings” link underneath
  3. At the very top, to the right of “Domain Name” change the domain to the new value
  4. If you have an SSL certificate activated on the domain, be sure to deselect it under the Security section on this page by choosing “Not Selected” from the Certificate drop down.
  5. Click the OK button to save your changes. This might take a few minutes for Plesk to make the domain change.

Create Domain Alias (optional)

If you want the old domain to redirect to the new one, choose “Add Domain Alias” in Plesk, and enter the old domain. Select the destination to be the newly renamed domain. By default all necessary boxes are checked. Mail aliasing will ensure that any emails sent to xyz@olddomain.com will be automatically delivered to xyz@newdomain.com. This is true for all email addresses configured at newdomain.com, which inherently must be the same addresses as which were configured for olddomain.com since you just changed it.

Create New SSL Certificate (optional)

If you had an SSL certificate for the old domain name, it will not match the new domain and so it won’t function properly after the domain change. If it’s a commercial/paid certificate, you will need to purchase a new SSL certificate that matches the new domain, and install it manually. If it’s a Let’s Encrypt free certificate, you’ll need to tell Plesk to generate a new one. Start by logging in to Plesk, then:

  1. If you did not deselect the certificate when changing your domain name in Plesk, you’ll need to do that now (step 4 under “Change The Domain in Plesk” above).
  2. Under the new domain in Plesk, Choose ‘SSL Certificates’ then remove the Let’s Encrypt certificate that matches the old domain.
  3. Once removed, under the new domain, click the “Let’s Encrypt” button and proceed with installing a new certificate. If you added the old domain as an alias, you should get the option to include the alias when creating the new certificate. It’s recommended to cover both domains when the option is available.

Using a web app like WordPress?

Changing the domain to a completely new domain will probably cause problems within the web app. It will need to have its configuration files and/or config in the database updated to reflect the new domain name.

If you’re using our 1-click web apps utility (Installatron) to manage your web app like WordPress, you’ll need to inform Installatron of the domain change. When you do this, it will automatically update the database and configuration of the changes so you don’t have to do it manually. Here’s how:

  1. Within Plesk, click 1-click web apps (or Installatron)
  2. Click the wrench icon beside the web app installed to the domain you changed. You might then see a warning about exactly this issue — that Installatron can’t find your web app
  3. Choose the Files & Tables tab
  4. Look for the editable field that has your domain name in it and change it to the new domain.
  5. Press the button at the bottom of the page to save your changes.
 In some instances, 1-click web apps has hard-coded the upload_path setting for WordPress in the database. When this is the case, your domain change will result in repeated errors in the logs about open_basedir restrictions and your site will likely load extremely slowly. Please take a look at the logs and, if you spot open_basedir errors, go here to learn how to fix this by removing the upload_path value from the database.

Not using 1-click web apps? Manual updates required.

If you’re not using Installatron, you’ll need to make these changes manually. Here’s a comprehensive guide on how to do that with WordPress. To get to phpMyAdmin as described in that article, log in to Plesk then choose “Databases” under the site you wish to adjust, followed by “phpMyAdmin” under the corresponding database.

You can probably find similar solutions for other content management systems with a quick Google search. If you do not find such a guide for your web app, do a global search for all instances of the old URL in the database and replace it with the new URL. Then do the same for all files, paying specific attention to config files.

Option B: Add new domain, remove existing

Important Notes:

  • This option will not work if the existing domain name is your primary domain. You cannot remove your primary domain.
  • This option will also not work if you have our Carbon or Helium hosting plan as you can only host one domain (which therefore must be your primary domain).
  • This option will not move your emails.

For those who can do this, here’s how:

  1. Login to Plesk
  2. Choose the Add Domain button and enter your new domain
  3. Move your website
    • If you have static content (ex: html files), you can simply use the Plesk File Manager to select all files in the domain web root for the existing domain, then move them to the web root for the new domain
    • If you’re using WordPress or any other app in our 1-click web apps manager, you can use this guide to clone your site from the old domain to the new one.
  4. Remove the old domain in Plesk. This option will not be available if it’s your primary domain.

Jordan is a computer, security, and network systems expert and a lover of all things web and tech. Jordan consults with project management for software companies. Jordan is a founder and managing partner at Websavers Inc.

3 Comments

  1. Nick on December 1, 2018 at 1:22 pm

    Hello! I wonder if you can help me. I remove an extra www that somebody had added to the website and plesk did not complain. As of yesterday though apache (through plex) throws the following error: “mkdir: cannot create directory ‘/var/www/vhosts/system/MY_SITE.COM/conf’: No such file or directory mktemp: failed to create file via template ‘/var/www/vhosts/system/MY_SITE.COM/conf/httpd.conf.XXXXXX’: No such file or directory Can not create temporary file”. Please note that in /var/www/vhosts/system/ I still have http://WWW.MY_SITE.COM and in /var/www/vhosts/ I have both the WWW and the new folder, but the site content is still in the WWW. Any clue as to how to fix this? Plesk tells me to contact people who sold the license who, in return, say can’t do anything because it’s a dedicated server somewhere (please note, not my site, I’m just managing WordPress). Anything would help!

    • Jordan Schelew on December 1, 2018 at 1:35 pm

      Hey Nick!

      If the Plesk UI thinks the domain no longer has the www then rename /var/www/vhosts/system/www.domain.com to /var/www/vhosts/system/domain.com to fix that up. Be sure to check ownership and permissions of the folder to ensure it matches other vhost folders in the /var/www/vhosts/system directory.

      You may also then need to move the content into the non www folder under /var/www/vhosts (not system).

      Cheers,

      Jordan

      PS: If you’re considering a switch if only for the existing host’s lack of support, we’d love to have you host with us!

      • Nick on December 1, 2018 at 4:05 pm

        Thanks for the quick answer. What would happen to all the configuration files (e.g. the ones in /var/www/vhosts/system/www.domain.com/conf/httpd.conf and siblings – especially httpd_ip_default.conf – and /etc/httpd/conf/plesk.conf.d/vhosts/www.MY_SITE.COM.conf) ? Would they – hopefully – get automatically updated? Because as now they all have the old www and http://www.www values in them…
        And, thanks for the offer but as I mentioned it’s not my choice to make 🙂

Leave a Comment