How to change domain (well done) – .com

In this tutorial we are going to see how to change the domain in a technically correct way to avoid errors and maintain positioning.

Before starting

at the time of change domain It is important to do it properly for the SEO to maintain the position we have achieved. It is true that it is possible that we lose something, since these processes are delicate, but following certain steps the possibilities decrease significantly.

Before you start, you should keep in mind that this process is not immediate. We can make the domain change in a short period of time, but the results in Google will wait a little longer. So we must have a little patience and in the meantime check that everything is going as it should.

Finally, before making any changes, we recommend that you carry out a backup of the site. So if there is an error, you can correct it quickly. Well then, let’s get to it!

Point new domain to hosting

In this example we will use as new domain your-new-domain.comand as old domain your-old-domain.com. Note that we use “.com” for simplicity, but it could be any other extension. oh! And remember to replace these references with your URLs 🙂

The first thing we will have to do is configure the new domain, https://your-new-domain.com, so that when we access through said link, we go directly to the hosting where we have the web hosted. That is, we must point the new domain to the hosting.

This process may vary depending on the registrar. If we have contracted the new domain on a different provider to the one of the hosting, we will have to make changes in the dns servers so that they point to the same hosting as the old domain. If you need information on how to carry out this step, you can see the tutorial where several examples are detailed.

On the other hand, we may have hired the new domain in the same provider that the hosting. In this case, some accommodations offer the possibility of making the domain change from the control panel itself. If we have this option, we simply have to follow the steps indicated. If the hosting does not have this option, then we will have to make a DNS change as we have just mentioned above.

Be it one way or another, the change will not occur immediately, it will be done gradually. This is what is called DNS propagation and it could take between 24 and 48 hours, although in practice it is usually ready sooner.

See also  Hide product categories in WooCommerce - .com

You can check how the propagation process is going with tools like , just writing the domain name and checking if the values ​​of the servers are correct.

Once the dns propagationwe will have the domain pointed to the hosting and we will be able to access our website also from https://your-old-domain.com, which will automatically redirect visits to the new one.

Having said this, we want to comment that generally we can ask the hosting support team to make the domain change for us. We will have to write to them to make the request, inform us about the steps we have to take before and after your operation to complete the process, and send what they need. Usually they will ask us for the data of the new domain, of the old one, as well as to authorize the technicians to make the change.

Modify URLs in WordPress

If we are using WordPress, we will have to modify a setting. We can do it directly in the database, as we see in the fifth class of the , or from the WordPress desktop. Let’s see this last option.

To configure the new domain we must enter “Settings / General” and replace the old domain that appears in “WordPress address (URL)” and “Site address (URL)” with the new domain.

Then we will save the changes and we will have to log in again. Once we do, we will have the WordPress URL set up correctly.

But this is not all. Although the web will work, there may be plugins or absolute links within our content that continue to use the old domain and, therefore, we will have to correct them so that they refer to the new domain.

So we are going to install and activate the plugin, which replaces one text with another in the WordPress database. Once done, we access “Tools / Better Search Replace”.

This process is very simple, but it is delicate. Remember, as we mentioned at the beginning, that it is important to have a copy of the database for what may happen.

Well then, let’s fill in the fields. We will simply have to write the old domain in “Search for” and the new domain in “Replace with”. Then we will select all the tables using the Shift key. On the other hand, we will leave the box to distinguish between upper and lower case letters unselected, and also the one to replace the GUID, as seen in the image.

See also  1842. Business idea: Technological raffle - .com

We advise, however, to leave the simulation option checked to carry out a test. When we do it we will check that everything is correctand then yes, we can uncheck mock option and run the changes.

Keep in mind that here we have only indicated the domain without extensions because they are both .com. If one were a .es and the other a .com, we would have to add the complete domains so that they could be replaced correctly. Well, when we’re done we can delete the plugin.

301 redirect in .htaccess

Cool! We have already corrected the links. Now we will go to a very important step for SEO, establish the 301 redirect in the File .htaccess. With this we will inform that it is a permanent redirection.

This could be done in cPanel, from the “Domains/Redirects” section or by modifying, or creating if it doesn’t exist, the .htaccess file. This file may be hidden, so before creating a new one, check that it does not exist.

And now let’s go to the code that we would have to add if we want to move the traffic from one domain to another and maintain the structure of the links. The content that should be included in the .htaccess file might look like this. Be careful with spaces :).

RewriteEngine On RewriteCond %{HTTP_HOST} ^your-old-domain\.com$ RewriteCond %{HTTP_HOST} ^www\.your-old-domain\.com$ RewriteRule ^(.*)$ “https\:\/\/ www\.your-new-domain\.com\/$1”

Remember to change the “your-old-domain” and “your-new-domain” to your respective URLs. This instruction will cause any URL from your old domain to redirect to the new one. You don’t have to go one by one, this instruction modifies the base domain in all of them.

Address change request in Search Console

Finally we have to access Google and add 4 properties more corresponding with the new domain, to later request the change of domain to Google. The properties would be the following:

http://your-new-domain.com http://www.your-new-domain.com https://your-new-domain.com https://www.your-new-domain.com

These properties are added in the same account in which we have the old domain, which in turn will also have its 4 properties verified in Google Search Console:

http://your-old-domain.com http://www.your-old-domain.com https://your-old-domain.com https://www.your-old-domain.com

Once we have all of them, we will go to the old version of Search Console, an option that we will find in the lower left corner, “Go to the old version”. Then we will choose the first property, click on the configuration wheel and then on “Change of address”.

Next we will have to request the change of address in Search Console. Basically we must choose a site from the list, then confirm that the 301 redirects work correctly, verify that the verification methods are still valid, and finally send the domain change request.

See also  301 redirects - .com

And that’s all! Google may take some time before the new domain is completely replaced by the old one. Can see the progress using the “site” command in the search. With “site:your-new-domain.com” and “site:your-old-domain.com” we will check the number of links indexed in each of them.

If all goes well, the number of URLs in the new domain should be increasing while those in the old domain should be decreasing until the change is complete.

On the other hand, it is recommended keep the domains at least one year, and if the old domain is about to expire, contract it again. In this way we will give Google time to complete the redirects.

Finally, comment that, although we are doing the redirection through htaccess, it would be good to analyze the external links and try to change at least the most relevant ones. We can also regenerate the sitemap and send it. All this will favor the process.

Summary and conclusion

To change the domain while maintaining the position we have to perform several steps: Configure the new domain to point to the hosting, wait for DNS propagation, and change the URLs in WordPress. Next we will install and activate the Better Search Replace plugin to replace any mentions of the old domain with the new domain.

When we have done that, it is time to carry out one of the crucial steps that will help us maintain the positioning. We need to perform a permanent 301 redirect from the old domain to the new one.

Finally, we must register the 4 properties of the new domain in the Search Console account where we have the old domain. Once we verify them, we can ask Google for the change of address.

And here is the tutorial! We hope it helps you. You already know that if you subscribe to you will have access to many courses, including the . There are more than 6044 videos available, we are waiting for you inside! 🙂

Loading Facebook Comments ...
Loading Disqus Comments ...