How to change the domain name illustration of WordPress website without affecting SEO

Changing the domain may seem like a daunting task at first, but it is not necessary. Typically, this involves routing traffic from the old domain name (olddomain.com) to the new domain name (newdomain.com). One of the biggest and most effective concerns for many people is how to maintain SEO advantages (rankings, traffic, backlinks) throughout the process so as not to damage your business.

We summarize this in-depth guide below, which contains all the information you need to know about how to safely change the WordPress domain name without ruining all the hard work you have done.

Reasons for changing the domain name

There are many reasons why you may want to change the domain name. Here are some common examples:

  • Your business is being renamed from one name to another, and you have a new domain name to match it.
  • Maybe you are using an unpopular top-level domain (TLD) (such as .net or .io) and eventually get a new shiny .com for your business.
  • You merge multiple attributes into a single field.
  • Your old domain is being punished by the entire site, and you need to start from scratch.

Important things to consider

There are some considerations and important things to keep in mind when changing your domain.

Website structure

If you only change the domain name, it is recommended that you keep the same URL structure. Example:olddomain.com/about-us/Tonewdomain.com/about-us/. In theory, you can change the name and structure at the same time, but in general, in terms of SEO, the fewer changes the better. The domain change is already a very significant change.

If your old site may not have a nice fixed link (which is better for SEO), it’s best to change it to your new domain name, wait six months, and then change the structure.

How to change the domain name illustration of WordPress website without affecting SEO1

WordPress fixed link

HTTPS

If your current site runs through HTTP, now is the best time to migrate to HTTPS. This is slightly different from changing the entire URL structure, and you will be rewarded in the long run. Since July 2018, Google Chrome has marked all non-HTTPS sites as “unsafe”. Other benefits of HTTPS include encryption, better recommendation data, performance improvements in HTTP/2, and even SEO ranking signals.

You can easily migrate to HTTPS while changing the domain name.

In addition, if your site is already a HTTPS, it is important to plan for your 301 redirection before continuing. This is because the client needs to establish an SSL connection with the host before seeing the redirection. Skip to the 301 redirection section that we discussed in detail.

Indexing and crawling

If you notice a slight drop in traffic temporarily, don’t panic when changing the WordPress domain. This is normal because it takes several weeks for Google to re-index and crawl your new URL.

How to change the WordPress domain name

Follow these steps to change your WordPress domain name.

  1. Back up your current WordPress website
  2. Create a new site, clone, or update an existing site address
  3. Update all internal and hard-coded links
  4. Add 301 redirection
  5. Update Google and Bing network resources
  6. Submit a new site map file
  7. Update Google Analytics and Google search console
  8. Miscellaneous. Publish domain change updates

1. Back up the current WordPress site

The first thing you should do before changing the WordPress domain name is to back up your current site. This way, no matter what happens, you can recover at any time when you need it.
Option 1-one-click backup of pagoda panel
If you are a pagoda panel user

Log in to the pagoda panel of the server and click “schedule tasks” on the left menu:

  • Task type-choose to back up the website or the database (both should add a task)
  • Task name-can be named by website domain name + backup content, such as yourdomain.com website backup (database backup)
  • Execution cycle-choose weekly or monthly backups according to your actual situation, and the database can generally choose weekly backups; websites can consider monthly backups (choose to perform backup tasks in the early morning as far as possible)
  • Backup website-that is, select which website you need to back up
  • Exclusion rules-only backup sites can be set, that is, you can choose to ignore some files or directories and not back up.

How to change the domain name illustration of WordPress website without affecting SEO2
Option 2-back up your website using the WordPress plug-in
You can also back up your WordPress website using third-party plug-ins. We always recommend using those with incremental backup options. Although you may not need the incremental features of this tutorial, these are features that you should be familiar with or invest in for a long time, because incremental features can reduce server load, disk space, and help improve reliability. The following is a list of recommended plug-ins:

  • VaultPress
  • ManageWP Backups
  • WP Time Capsule

Or, if you only want an one-time backup, you can use the free Duplicator plug-in and create a local archive backup.

How to change the domain name illustration of WordPress website without affecting SEO3

Create a WordPress backup using the Duplicator plug-in

Option 3-manually back up your WordPress site
Your third option is to back up your WordPress site manually by exporting the MySQL file and connecting to your site through SFTP and downloading the file. Unless you have a special configuration, you usually only need to download your/wp-content/Folder (because it contains your plug-in, theme, and uploaded media).

How to change the domain name illustration of WordPress website without affecting SEO4

WordPress wp-content folder

two。 Create a new site, clone, or update an existing site address

After backing up the site, the next step is to update your WordPress URL and site address. There are several ways to solve this problem.

Option 1-create a new site / account

Your first choice is to create a completely new WordPress installation with your new domain, and then migrate your data. Then, you will change the domain afterwards. Why do you use this method? Sometimes people prefer to keep their old site intact for a period of time as another backup. Alternatively, you may also migrate to a new WordPress host in the process.

In this case, you only need to create a second site.

Option 2-Clone featur

Some host service providers provide one-click cloning function. This allows you to immediately create a copy of your existing WordPress site into a second account.

Option 3-Update existing WordPress URL and site addresses

The third and final option is to simply update the WordPress URL and site address of the existing site. Even if you create or clone a new site above, you still need to perform these steps.

Be careful when editing these values, because if you enter them incorrectly, it may cause the entire site to crash. Under Settings on the left, click General. You can then update the following:

  • WordPress address (URL): the address of your WordPress core file.
  • Site address (URL): the address where you visit your blog.

Unless you provide your own directory for WordPress, both should match. Remember that after you click Save changes, your WordPress dashboard is now accessible only through the new domain.

How to change the domain name illustration of WordPress website without affecting SEO5

Update WordPress address and site URL

See other ways to update these values, such as using wp-config.php files, directly in the WordPress database, or using WP-CLI.

Now that you have changed the WordPress site address and URL to the new domain, it is time to update all internal and hard-coded links. In general, hard-coding URL is not recommended, but it is likely that you will use it over time, as we all do. This includes links between your own content, media, JavaScript and CSS links on the site, and so on. Here are several options for you to update the link.
Option 1-search and replace
Refer to our previous database search and replacement tutorials to do this.

Here are the simple steps to update the old domain to the new domain:

  1. Enter the value you want to search in the database in the search field, which in this case is our old domain:https://olddomain.com. (make sure you use the correct protocol: HTTP:// or HTTPS://)
  2. Enter a new value in the replace field that should be used to replace the value you are searching for. In this case, it is our new domain:https://newdomain.com.
  3. Be sure to select the trial run option first, as this will calculate how many replacements will take place without the actual replacement. Then click “replace”.
  4. You can then run replace again without selecting a trial run to make changes in the database.

Option 2-use the WordPress plug-in to update links
Another simple method you can use is a free plug-in called Better Search Replace, developed by Delicious Brains’s excellent WordPress team. Just install it, enter your old domain and your new domain, and you’re done!

How to change the domain name illustration of WordPress website without affecting SEO6

Replace update fields with better searches

Option 3-search and replace using WP-CLI

For tech-savvy people and developers who don’t like to leave the command line, you can also use WP-CLI to update your links. We recommend that you review this advanced search and replace the WP-CLI guide.

Update your CDN

If you use CDN with CNAME, such as cdn.domain.com, you may want to run the steps we shared above again, but this time replace your custom CDN URL. This is because sometimes things are accidentally hard-coded due to copy and paste.

Replacehttps://cdn.olddomain.comForhttps://cdn.newdomain.com.

Since your domain has changed, you will probably need to add a new CNAME DNS record for your CDN as well.

4. Add 301 redirection

Next, it’s time to add 301 redirects. This is one of the most important parts of domain name changes so far. This ensures that all traffic from the old domain (olddomain.com) is automatically routed to the new domain (newdomain.com). Here are several reasons why 301 redirection is so important:

  • Over time, people will backlink to your site and content. Backlinks are used by Google as a ranking signal. Therefore, you don’t want to lose what they call “link weights.” In other words, links are authoritative, and if you lose them suddenly, it can seriously damage your site’s SEO and take a long time to recover. According to many SEO and case studies, 301 redirects pass 90-99% of the link weights.
  • In addition to SEO about backlinks, redirection is also important for usability. The last thing you want is for someone to click on a backlink and they no longer visit your site. Broken links are never good.
  • Social signals are another ranking factor, although some people may disagree with this. In any case, it’s not good to have links to your site from social media sites like Pinterest or Twitter that suddenly don’t work.

If you don’t add redirects, it will undoubtedly damage your site.

Warning-you should always keep the redirection

So that’s where it can get a little tricky. If you have a lot of history on the old domain, you probably want to keep the 301 redirection forever (or at least for a long time). Why? Because deleting all backlinks may hurt you unless you want to go back and try to update all backlinks manually (which is impossible). This means that you may and should update the old domain forever.

In addition, with regard to 301 redirects, if your old domain runs through HTTPS, it means that you also need to install SSL certificates on it. This is because the client needs to establish an SSL connection with the host before seeing the redirection. But rest assured, this does not necessarily mean that you need to keep your old site / host up and running.

The following are instructions on how to add 301 redirects. These redirects are done where your old domain is hosted. If you want to get rid of the old domain and / or hosting, we will discuss it in depth.

Option 1-add redirection at the server level

.htaccess in Apache

If your WordPress site is running on Apache, you can add the following rules to the .htaccess file of the old site, which is usually located in the root directory of the site.

#Options +FollowSymLinks  RewriteEngine on  RewriteRule (.*) https://newdomain.com/$1 [R=301,L]

Nginx

If your WordPress site is running on Nginx, you can add the following rules to the configuration file of the old site.

server { server_name example.com; return 301 $scheme://newdomain.com$request_uri; }

Option 2-add redirection to your host

If you are a pagoda user, you can add your old domain to the pagoda panel at any time, install a free Let’s Encrypt certificate on it, and then use the redirect tool to add a wildcard 301 redirect to your new domain. The following is an example of the rule you want to add:

   olddomain.com - ^(.*)$ - https://newdomain.com$1 

You can then keep this redirect forever to ensure that all backlinks are retained.

How to change the domain name illustration of WordPress website without affecting SEO7

WordPress 301Redirect

Option 3-add 301 wildcard redirection using Cloudflare

The third way to solve the SSL 301 redirection problem is to use Cloudflare. They will allow you to add 301 redirects to your site for free, even if there is no host connection. This can be an effective way to add redirects without worrying about leaving the old host in place or requiring any other configuration.

Wildcard redirection ensures that any traffic that attempts to access olddomain.com/blog is redirected to newdomain.com/blog. Therefore, in this case, the following 301 redirection works:

http://olddomain.com/301 redirect tohttps://newdomain.com

https://olddomain.com/301 redirect tohttps://newdomain.com

http://olddomain.com/*301 redirect tohttps://newdomain.com/*

https://olddomain.com/*301 redirect tohttps://newdomain.com/*

This ensures that all backlinks on HTTP and HTTPS versions are not broken for SEO purposes. To add wildcard redirects, simply add your old domain to Cloudflare and create a “Forwarding URL” page rule for it. Be sure to select “301-Permanent Redirect” and use the correct syntax, as shown below.

How to change the domain name illustration of WordPress website without affecting SEO8

Cloudflare 301 redirect page rules

Option 4-add 301 wildcard redirection using the domain registry

The fourth way to add redirection is at the domain registrar level. Some domain name registrars, such as NameCheap, support 301 wildcard redirection. However, this option is valid only if you redirect a HTTP site to a HTTP or HTTPS site. Keep in mind that the original domain requires a SSL certificate to redirect from HTTPS to HTTPS to work properly.

Check your redirection carefully

Once the redirection is in place, you can use free tools such as the redirect tracker to ensure that your redirection works properly and that you do not accidentally add a redirect loop that triggers a “redirect too much” error to show ​​ to your visitors. There is also a great little Chrome extension, Redirect Path, which is very convenient!

How to change the domain name illustration of WordPress website without affecting SEO9

Redirect tracker

After adding redirects to your site, it is important to test different variants of URL. If there is a problem, you can also contact your WordPress host for assistance. It is also important to check to make sure that there are not too many redirects linked together, as this can cause performance problems.

Check out our in-depth article on WordPress redirection and best practices for faster performance.

5. Update Google and Bing

Now that you have sent the old domain routing request to the new domain, it is time to update your network assets with Google Search Console and Bing Webmaster Tools. If you have never set these for olddomain.com, continue to create them, verify them, and then repeat these steps for your newdomain.com. Then follow these steps. You should have a total of four properties (two old and two new) between the Google Search Console and Bing webmaster tools.

Change address in Google Search Console

In Google Search Console, you need to execute what they call “change of address”. This is important because it lets Google know immediately that everything is changing. So don’t skip this step! Both your old and new domains require validated properties.

Simply click the configuration file in the old domain, click the gear icon in the upper right corner, and then select “Change of Address”. Then follow the remaining prompts.

How to change the domain name illustration of WordPress website without affecting SEO10

Use Google Search Console to change address

Note: the “Change of Address” tool is currently only available in the new Google Search Console.

If your site is only in the new Google Search Console. You can easily add it again using the “URL prefix” method, and then you can visit your Web site in the old Google Search Console. It is likely that they will eventually transfer the tool to the new GSC.

How to change the domain name illustration of WordPress website without affecting SEO11

Google Search Console URL prefix

Site Mobility in the Bing webmaster tool

Like Google Search Console, the Bing webmaster tool has the same type of process called “Site Move”. Similarly, you need to provide validated properties for your old and new domains.

Simply click the configuration file of the old domain, and then click “Diagnostics & Tools & gt; Site Move”. Then select the option for move URLs from this site to another verified site.

How to change the domain name illustration of WordPress website without affecting SEO12

Site Mobility in the Bing webmaster tool

6. Submit a new site map file

Now that you have new validated network media resources and you have notified them of domain changes, it is recommended that you submit a new site map file. The site map is basically just a list of URL that you want to make public. This is not required, but it is likely to help speed up the crawling and re-indexing process.

If you are using the Yoast SEO plug-in, you can find a link to your XML site map file under “SEO” → “General”. Click the Features tab, and then click the question mark tooltip next to the title of the XML site map. The URL should look like this:https://newdomain.com/sitemap_index.xml

How to change the domain name illustration of WordPress website without affecting SEO13

WordPress site map file

Submit a site map in Google Search Console

In Google Search Console, you can submit your new site map under “Index → Sitemaps”. Enter the URL you obtained from Yoast SEO, and then click submit.

How to change the domain name illustration of WordPress website without affecting SEO14

Submit a site map file in Google Search Console

Submit a site map in the Bing webmaster tool

In the Bing webmaster tool, you can submit a new site map under “Crawl & gt; Sitemaps”. Click “Add/Test Sitemap” and enter the URL you obtained from Yoast SEO.

How to change the domain name illustration of WordPress website without affecting SEO15

Submit a site map file in the Bing webmaster tool

7. Update Google Analytics and Google search console

The next step is to update your Google Analytics profile. If you don’t use Google Analytics on your site, you should use it, because it’s by far the best free way to analyze traffic, patterns, and transformations on your site! The easiest way is to click “Admin”, go to “Property Settings” and update the default URL. The reason we recommend that you simply change existing resources rather than create new ones is that it makes it easier to compare history and traffic (especially if you maintain the same URL structure).

How to change the domain name illustration of WordPress website without affecting SEO16

Update Google Analytics profile

Reconnect Google Search Console

At the bottom of the same page, you also need to reconnect your Google Search Console profile to Google Analytics. Just click “Adjust Search Console” and follow the steps. This allows additional data to flow into the “Acquisition & gt; Search Console” section of the analysis, such as login pages, countries, devices, and queries (perhaps the most important one).

How to change the domain name illustration of WordPress website without affecting SEO17

Reconnect Google Search Console and Analytics

8. Other domain changes updates and checks

Because each site uses different software and services, you probably need to check some other things as well. Here’s a list of some of the common questions we’ve experienced:

  • If you migrate or clone your site, we usually see changes or misconfigurations in the robots.txt file.
  • If you are running a comment plug-in such as Disqus, you need to migrate your Disqus comments to a new domain.
  • If you have email marketing software, you will most likely need to update your domain and verify your domain again with a new DNS record.
  • Update social media links (Facebook pages, Twitter resumes, Pinterest, Google+, etc.)
  • Update PPC advertising websites: AdWords, Bing Ads, AdRoll, Facebook Ads, etc.
  • If you participate in any affiliated programs or advertising networks (such as Mediavine), you may need to update your address to them and pass the re-approval process.
  • Be sure to monitor the 404 error after moving to the new domain so that you can fix any broken links that pop up. You can view these under “Crawl & gt; Crawl Errors” in Google Search Console, or use a third-party WordPress plug-in, such as Redirection, which has 404 error reports. Note: we usually recommend using the Google search console to handle these things, because plug-ins like this only take advantage of additional server resources.

Summary

As you can see, changing your WordPress domain requires a lot of work. But with some careful preparation and correct guidance, you can ensure that you maintain your SEO advantages without harming your business. Keep in mind that you may see some decline, which is to be expected. The same applies to website redesign. If you are not careful, you may lose a lot of SEO traffic. But as long as you keep going, you should be fine. After all, moving to a whole new field should also be an exciting experience!

Disclaimer: All articles on this website, unless otherwise specified or marked, are original and published on this website. Any individual or organization is prohibited from copying, stealing, collecting, or publishing the content of this site to any website, book, or other media platform without the consent of this site. If the content on this website infringes on the legitimate rights and interests of the original author, you can contact us for assistance.