Step-by-Step Guide to Changing your WordPress Domain
Your WordPress domain name represents your brand, but sometimes rebranding or small mistakes call for a change.
In this article, we’ll explore why you might need to change your domain name, how it affects your search rankings, and what steps to take for a smooth transition.
5 Reasons to change your domain name on WordPress
Whatever your reason, you can change your domain name whenever you like. However, it’s not a decision you should take lightly. Unless you’re absolutely certain it’s the right move for your website, you might want to reconsider before making the switch.
Here are some strong reasons to change your domain name:
Business name change
If you’ve decided to change your business name, it’s essential that your domain reflects this update to maintain brand consistency and consumer trust.
Rebranding
Rebranding is the reinvention of your company’s image. This could be a change in your tagline, logo, or even your niche. If your brand name no longer reflects these changes, then you have to update your domain name.
For example, if you once sold coffee and your domain was freshcoffee.com, but now you’ve expanded into pastries, an update to match your broader offerings would be a smart move.
Domain extensions need an update
Maybe you started with a .net or .org but now want a .com for wider recognition. Changing your domain extension can enhance your site’s accessibility and credibility.
Trademark issues
You could face legal action if your domain name infringes on a trademark or closely resembles a well-known brand. Changing your domain now can help you avoid costly disputes, protect your brand’s reputation, and prevent losing the domain altogether.
Random mistake
A typo or incorrect extension in your domain can confuse visitors and hurt your credibility. Correcting these mistakes quickly will help restore trust and make your site easier to find.
How to change your WordPress domain name
Now, what if you just bought your domain? Don’t wait to change your domain name if you’re unhappy with it. It’s easier to fix it now than later.
Updating your domain name
You can change your primary domain anytime, whether you made a simple mistake or need a major revamp. Here’s how to do it:
- Purchase a new domain
- Go to your WordPress site’s dashboard
- Navigate to the Upgrades Section
- Go to the “Domains” or “Hosting ” tab
- Click “Add Domain to this site” and choose your new domain
- Once the domain is registered, set it as your site’s primary address.
- You can cancel your original domain or keep it as a secondary domain.
As you can see, the process itself is very straightforward. However, your domain name change journey doesn’t end there. Unless your website is relatively new or hasn’t launched yet, you need to take a few additional steps to get it up and running.
What to do when changing your primary domain
Announcing the change ahead of time is an excellent first step. Still, it’s not enough. Even with an announcement, some users might miss the update and get lost when they visit your old domain. And that’s just one of the things you need to address before you change your existing domain.
Switching your domain without proper preparation can damage your SEO rankings, backlinks, and user trust. To avoid this, it’s best to cover all your bases and ensure a hassle-free experience for all visitors.
Here’s a checklist of things you can do to prepare yourself for the shift:
- Secure the new domain
Ensure the new domain is available and secure it. Without it, proceeding with a domain change will be impossible.
- Back up your website
Make sure you have a duplicate of your website data. Changing from an old domain name requires migrating your data. By backing up your data, you can ensure easy restoration of your website.
- Check hosting compatibility
Make sure your hosting provider supports the new domain, especially if you’re switching to a different TLD (like from .net to .com). Some hosts may have specific requirements for handling domain changes.
- Prepare for SEO impacts
A domain change can affect your SEO. To minimize the effects, update your sitemap, notify search engines, and implement 301 redirects. Search engines don’t immediately crawl new domains, so informing them of your domain change helps streamline the process. This ensures they can efficiently track visitor activity, safeguarding both your rankings and the user search experience.
- Update internal and external links
Check all your links to make sure they’re working. This includes links within your website and links to other websites. If any links are broken, fix them or redirect them to the correct page.
Focus on fixing links to important pages first. This will help your website work better and keep visitors happy.
To avoid broken links and 404 pages, set up 301 redirects. This tells search engines and visitors that the content has moved to a new address.
- Update Google Search Console and analytics platforms
After the switch, update your Google Search Console and analytics platforms to reflect the new domain. This helps search engines crawl your new site and track performance accurately.
Now that you’ve completed the essential preparations, you’re ready to change your domain name
Backup your website
Backing up your website depends largely on your hosting provider. While it’s not always necessary, it’s a brilliant safety measure. Should anything go wrong during the domain change, having a backup ensures you can restore your site without losing valuable content.
Here are a few ways you can back up your site:
- Hosting Control Panel (cPanel) Backups:
- Log in to your hosting provider’s cPanel.
- Go to Files > Backup or Backup Wizard.
- Select Full Backup or Partial Backup (home directory, databases).
- Click Download and save the file.
- FTP Backup (Including WordPress Logs):
- Install and configure an FTP client like FileZilla.
- Use the FTP credentials provided by your hosting provider to connect.
- Navigate to your public_html or www directory (where WordPress files are stored).
- Download the entire directory to your device.
- For WordPress log files, navigate to the directory where your wp-content/debug.log (or other logs) are stored and download them for troubleshooting or record-keeping.
- For database backup, use phpMyAdmin in your hosting control panel:
- Go to Databases > phpMyAdmin.
- Select your WordPress database.
- Click Export, choose Quick Export method, and save the file.
- Use a Backup Plugin like CodeGuard:
- Install and activate the plugin from your dashboard.
- Log in to your hosting provider’s control panel.
- Navigate to the CodeGuard section.
- Click Add Website and follow the prompts to connect your website.
- Once connected, select Backup Now to initiate a backup of your site.
- Monitor the backup progress and store it in your CodeGuard dashboard.
Why choose CodeGuard?
CodeGuard automatically backs up your site every day and monitors any changes. If something goes haywire, you can easily restore it with one click! Plus, with version control, you can easily go back to any previous version of your site, making it super simple to recover from any issues quickly and stress-free.
With your website backed up, it’s time to move on to the next crucial step in the domain change process: adding your new domain to your hosting account.
Add your new domain to your hosting account
Once you’ve registered your new domain, you’ll need to connect it to your hosting provider. Follow these quick steps:
- Log in to your hosting control panel (e.g., cPanel, Plesk, or a custom dashboard)
- Navigate to Domain Management or Addon Domains
- Enter your new domain name in the designated field
- Assign the appropriate document root (you can find it in folders labeled “Document Root,” “Folder,” or “Directory”)
- Confirm by clicking Add domain or the equivalent button.
Note: Steps may differ slightly depending on your hosting provider. Check your hosting platform’s documentation or support if the steps differ.
Your domain is now linked to your hosting account, and you’re ready to update your WordPress settings.
Update WordPress settings
You need to update your WordPress settings, so the new domain works on your site. The following steps vary depending on the hosting provider you use. Here’s how you can update your WordPress settings if you host through WordPress directly or on providers that use Hosting Managers like cPanel, Plesk, or Unix.
For WordPress hosted sites:
- Log in to your WordPress.com account.
- Go to My Site > Settings > Domains.
- Select the option to change your primary domain to the new one.
- Follow any additional prompts to complete the domain change.
For sites hosted on other hosting providers
1. Update the Site URL and Home URL
- Log in to your WordPress dashboard.
- Go to Settings > General.
- Update both the WordPress Address (URL) and Site Address (URL) fields with your new domain name (e.g., https://newdomain.com).
- Save the changes.
2. For cPanel and Plesk Users:
- Log in to cPanel or your Plesk Control Panel
- In the Databases tab locate phpMyAdmin
- Select the WordPress database associated with your site
- Locate the wp_options table in the list on the left.
- Find the fields labeled siteurl and home and click Edit next to each.
- Update both URLs to your new domain and click Save.
- Clear your browser cache and verify the changes by visiting your new domain.
3. For Unix Users:
- Access your site’s files via file transfer protocol (FTP), secure shell (SSH), or your hosting control panel’s file manager.
- Locate and open the wp-config.php file.
- Add the following code to define the new domain:
define (‘WP_HOME’, ‘https://newdomain.com‘); define (‘WP_SITEURL’, ‘https://newdomain.com‘);
- Save the file clear your browser cache
- Check your site to ensure it loads correctly.
4. Update Permalinks
These control how the URLs for your posts and pages are structured
- Go to Settings > Permalinks.
- Select your preferred permalink structure (or if it’s already set, click Save Changes to refresh the links).
Note: These changes only update your site’s appearance under the new domain. To connect your old domain to the new one and ensure visitors are redirected properly, you’ll need to set up a 301 redirect.
Set up 301 redirects
To make sure visitors reach your new website even if they use your old domain, you need to set up a 301 redirect. This ensures that anyone entering your old WordPress site address is automatically routed to the updated one.
Setting Up 301 redirects on WordPress
- Log in to your WordPress account.
- Go to My Site > Settings > Domains.
- Select the old domain and look for an option to add a Site Redirect.
- Follow the prompts to set the new domain as the destination.
- Save the changes and test the redirection.
Setting up 301 redirects on other hosting providers
Using cPanel’s Redirect Tool
- Log in to your hosting control panel (cPanel or equivalent).
- Navigate to the Domains section and select Redirects.
- Choose the 301 redirect option and enter your old domain as the source and your new domain as the destination.
- Save the settings and test the redirection.
Using the .htaccess File (For Apache Servers)
- Access your site’s files via FTP or your hosting control panel’s file manager.
- Locate the .htaccess file in the root directory of your old domain (usually inside the /public_html/ folder).
- Open the file and add the following lines to redirect all traffic to your new domain:
RewriteEngine On RewriteCond %{HTTP_HOST} ^olddomain\.com [NC] RewriteRule ^(.*)$ https://newdomain.com/$1 [L,R=301,NC]
- Save the file and test by visiting your old domain to ensure it redirects properly.
Update internal links and media
Now that your redirects are in place, it’s time to clean up your internal links and media. Think of this as a final sweep of your entire site. This step will help ensure that no internal links or media files still point to the old domain, preventing broken links or missing files.
Steps to update internal links and media
- Search and Replace Tool. Use a plugin like Better Search Replace to search for any references to your old domain in your posts, pages, and media files and replace them with the new domain.
- Manual Check (Optional). If you prefer, you can manually review your content, updating any hard-coded URLs that still point to your old domain.
- Update Media Files. Ensure that all images, videos, and other media are loading correctly under the new domain. If you find broken media links, update them in the media library or directly within the affected posts.
After that, we still need to make sure Google knows how to find your new domain. Hence, we’ll test and troubleshoot your WordPress site to ensure everything works perfectly.
Resubmit sitemap to Google Search Console
At this point, we need to ensure your site gets crawled and indexed correctly under your new domain.
Steps to resubmit your sitemap
- Log in to Google Search Console with the account associated with your site.
- In the property selector, choose your new domain (if it’s not already added, add it as a new property).
- From the left-hand menu, go to Sitemaps under the Index section.
- In the Add a new sitemap field, enter the URL of your new sitemap (usually https://newdomain.com/sitemap.xml).
- Click Submit.
That’s it! Google will start crawling your site, and you can monitor progress in the Coverage section of Search Console.
Test and troubleshoot
Before calling it a day, let’s review common mistakes and double-check everything after the domain change.
Common mistakes when changing a WordPress domain
- Not setting up 301 redirects properly.
- Forgetting to update internal links.
- Not updating Google Search Console.
- Skipping a full backup before starting.
- Overlooking SEO impact.
Other things to check when changing your domain name
- Update your social media links. Ensure all your social media profiles reflect the new domain.
- Update email address settings. If you use domain-based email, you may need to update your MX records to ensure your emails are delivered correctly.
- Update third-party services. Notify services like email marketing platforms, CRM tools, or payment gateways that your domain has changed.
- Monitor your traffic: Use tools like Google Analytics to watch for any sudden drops or errors after the domain change
Secure the perfect domain for your WordPress site
Now that you know how to change your WordPress domain name, it’s time to secure the perfect domain for your brand.
Get your ideal domain at Domain.com and take advantage of our SSL packages for a secure site and expert domain specialists ready to assist. Whether you need help setting up your domain, migrating your database, or ensuring your site’s security, we’ve got you covered. Start your journey today!
Frequently Asked Questions
Changing your domain can impact SEO and traffic temporarily, and there may be some downtime while the changes take effect. To minimize issues, you can use domain parking and set up 301 redirects to guide visitors to your new domain.
The changes typically take effect within a few minutes to 48 hours, depending on how quickly your DNS settings propagate. However, it may take longer for search engines to fully index your new domain.
Absolutely. You can’t transfer the SSL certificate from your old domain to the new one, so you’ll need to get a new SSL certificate. This ensures your new domain remains secure and compliant with HTTPS.
Of course! It’s a good practice to keep your old domain for a while, set up 301 redirects, and give your visitors time to get used to the change before eventually letting it expire.
Without 301 redirects, you could lose your old visitors and traffic, and search engines won’t know your site has moved, affecting your SEO.
Not without adjustments. Like your domain change, back up your email mailbox first. After that, set up email forwarding to ensure all messages sent to your old domain are forwarded to your new domain.
Remember, this forward is temporary, so you’ll need to update your MX records to ensure your email hosting provider knows where to route messages to your new domain’s email server.
If your email is tied to your old domain, it will stop working after you update your email settings including your MX records, to reflect the new domain.
Absolutely! With careful planning (like setting up 301 redirects and updating DNS), you can change your domain with minimal or no downtime.
If your new domain isn’t available, consider finding a different one instead. With the AI domain generator you instantly get a list of domains relevant to the one you chose. If you’re really set on it though, you can also purchase the domain through a backorder, however this could greatly delay your domain switch, potentially impacting your SEO.
Definitely. Resubmit your sitemap via Google Search Console so your new domain gets indexed, and search engines recognize the change.