With more than 366 million domain names already registered online, it can be intimidating to start the process of changing your own domain name.

For one thing, you might have a hard time finding another unique domain name. And, if you aren't entirely sure of how to do it correctly, you could damage your WordPress site's SEO — or even completely lose your content.

Grow Your Business With HubSpot's Tools for WordPress Websites

It's important to know all the steps to changing a domain name before you get started, from choosing a new domain name to backing up your website to redirecting URLs.

Follow along for a step-by-step guide on how to change your domain name on WordPress.

Reasons for Changing Your WordPress Domain Name

There are plenty of reasons you might want or need to change your domain name. Perhaps your business goals have changed and it's time to rebrand.

Alternatively, maybe you need to reconsider your domain extensions, such as changing .net to .com or switching from a free platform with a required domain extension to a paid option with just your primary domain name. For example, you might find it more professional to move from yourdomain.wordpress.com to yourdomain.com.

What to Do Before Changing Your Domain Name

There are a few important things to have in order before you start digging into the wp-config.php or the FTP.

1. Choose a New Domain

Before you start moving everything over, you'll need to choose and own your new domain name.

There are plenty of domain registrars online, and some hosting services even offer free domains.

If you need help establishing your domain, you can check out this free HubSpot course on how to build your WordPress website, which offers helpful information on how to set up your domain as well.

2. Backup Your Website

There would be nothing worse than completely losing all of your content under your own domain name while transferring to a new domain name.

The process can get complex at times, but backing up your website is a quick and easy way to safeguard your work in case something doesn't go quite right. Luckily, we will go more in depth here on a variety of plugins that will help you backup your website with ease.

3. Notify Your Audience

Once you have a new domain name solidified, you'll want to start letting your audience know that they might see some changes as you change to a new domain name.

Let them know when they can expect to see your new domain, and reassure them that they'll still be able to access your content.

How to Change Domain Name on WordPress

Ready to learn how to change your primary domain on WordPress? Things can get a little technical here, but by following these steps closely, the process will be seamless.

1. Change the Domain in WordPress

Log into your WordPress account, and from the dashboard, go to Settings > General. Change both the WordPress Address and Site Address to your new domain name, then save.

2. Update the wp-config.php

What is the wp-config.php? This is a crucial file in your WordPress installation that contains important data and configuration information from your website.

To access and update this with your new domain, you'll need to find your FTP credentials from your hosting provider. Once you have access to the FTP, go to public_html > wp-config.php, then right-click the file and select Edit. What you will see is:

 
define('WP_HOME','http://yoursitename.com');

define('WP_SITEURL','http://yoursitename.com');

Change ‘yoursitename' to the new domain name, then save.

3. Update the WordPress Database

Go to your hosting control panel and find phpMyAdmin. Find wp_options, then type your new domain into ‘siteurl' and ‘home'. Click Go to save.

4. Redirect the Former Domain

It's time to ensure your old website is redirected to the new website, as audiences might still stumble upon your old URL or forget that you've changed to a new domain. By redirecting, they can type in the old domain and still end up on your new domain.

To set up these 301 redirects, as they are called, go to your hosting control panel and choose the file manager. Go to the .htaccess folder, and right-click to edit. Add the following code, changing ‘newdomain' to your new domain, to the top of the page:

 
#Options +FollowSymLinks

RewriteEngine on

RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]

5. Notify Search Engines

Search engines, particularly Google, have tools to change your site address. You'll fill out a simple form to notify search engines of the change, so they can direct search traffic to your new domain name. Make sure you fulfill the requirements for Google here, then access the Change of Address tool here.

WordPress Change Domain Plugins

Need help backing up your website or redirecting your URLs? There's a plugin for that! Here are some popular options that can help you with these tasks and more as you handle your WordPress domain change.

1. Duplicator

Duplicator is a top-rated plugin for WordPress migrations and backups. You can easily backup your site and move your website, and this tool is especially helpful if you'll also be switching hosts during your domain change. Duplicator will download your entire WordPress site — plugins, themes, and all — into a .zip file as a backup or for simplified migrations with no downtime.

2. Redirection

The aptly named Redirection plugin makes light work of 301 redirects. It also tracks 404 errors to make sure your website isn't suffering in search rankings due to broken links, domain change-related or not. Down the line, you might also find other reasons for redirects, and this plugin allows for conditional redirects.

3. Backup Guard

Another option for backups and migrations, Backup Guard offers backup and restore functionality for your website's files. If you upgrade to the premium version, Backup Guard will also handle migrating your website from one domain to another, making the process a piece of cake.

Follow These Tips for a Stress-Free WordPress Domain Change

No matter the reason, changing a domain name can feel stressful. Even just finding a new domain can be a process in-and-of itself.

But with a little preparation and this guide on handling WordPress domain changes, you can have your new domain set up in no time — regardless of whether you do everything manually, or install a plugin to lend you a hand.

Use HubSpot tools on your WordPress website and connect the two platforms  without dealing with code. Click here to learn more.

 Use HubSpot tools on your WordPress website and connect the two platforms  without dealing with code. Click here to learn more.

Originally published Dec 25, 2020 7:00:00 AM, updated December 25 2020

Topics:

Web Hosting