.

6 Things to Remember When Changing Website Domain of Drupal Web Page

It would be a strange world if we didn’t use names, but call each other "you" or, even worse, use numbers. In everyday life, we are well aware of the importance of our name. Some even ascribe to it meanings or magical powers that contribute to success in private and professional life. Therefore, it shouldn't be surprising that the name of our website domain is as important as our own name.

Changing website domain – general information

The world, however, doesn't stand still and at some point, changing the website domain may become necessary. Sounds scary and extremely complicated, doesn't it? Today we’ll try to show that the process can be painless and smooth if we know what we're doing, and possibly easier than changing our own name.

The first question that'll surely arise is: "Why exactly should I change it?" Unfortunately, there's no single answer here. There may be many reasons for changing a domain, from the purely marketing ones, through expanding our services, to a situation where a name derived from your native language may look funny to foreigners when you enter a wider market. For example, the United Nations recognized the change of the international name of Turkey to a more neutral name, Türkiye.

Going back to the websites, let's take a look at some examples of domain changes:

  • FaceMash -> TheFacebook -> Facebook,
  • Musically -> Tiktok,
  • Taxify -> Bolt.

Benefits

It's possible that our name no longer reflects what our company has become after its many years of operation. The current name may discourage or narrow down the group of clients we want to reach. Changing the domain name may therefore expand the group of our recipients and facilitate the introduction of new services. A good example here is Taxify, which has changed its taxi-related name to a more general one, Bolt, at the same time offering more services than just taxis – scooters and food delivery.

Cons

The main disadvantage is that a large part of our clients may simply be attached to our current name, and such a big change may have an impact on their perception of our company. In addition to acquiring new customers, we'll have to convince the old ones that we are still us. We should mention here the great marketing campaign of Musically, in which famous influencers were convincing people that "Musically is now Tiktok".

Threats

Incompetent change of a website domain may lead to many painful and often (financially) expensive mistakes. It isn’t difficult to imagine a situation where the Google rank developed over the years may be ruined by badly prepared (or, even worse, lack of) redirecting for our domain.

We may encounter many more such smaller or bigger threats. Today we'll try to guide you through this problem, pointing out the key elements of such a change.

1. Choosing a new domain name

Choosing a name isn't an easy task, and there's certainly no one best way to approach it. The things we should focus on are:

  • Reflecting our business. It should be easy for the client to mentally link our name with the type of offered services. This helps to be better remembered and therefore associated with a specific activity.
  • Uniqueness. After all, we don't want to imitate our competition. Abibas shoes are unlikely to inspire trust, right?
  • Conciseness. A name isn't a description, so we shouldn’t forget to keep it concise. It'll also make it easier to remember.
  • Domain extensions. When buying a website domain, it's also worth paying attention to its extension. There are more extensions than "com", "uk" or "es". Sometimes, we can use extensions in an interesting and original way, e.g.: https://www.fund.me/
Domain name definition is pretty simple. The elements you can choose are name and extension.

 

Fun fact: Did you know that the royalties from the use of the ".tv" domain account for as much as 10% of the GDP of the tiny island of Tuvalu, located in the Pacific Ocean?

2. Checking links in text

We should start the process of transferring a website to a new domain with the analysis of what we have at the given moment. We should remember that our old domain isn't only an address in the bar, but also many links that we may have included on subpages and within the content of our articles. We understand that it may be impossible to review all of the content on our website. Fortunately, there are many tools on the market that should help us with this task, indicating the specific places where our address appears in the content of the web page. One of such tools that we use is Screaming Frog. However, surely everyone will find a program tailored to their needs. The choice is very broad here.

Suppose we locate our "unwanted" addresses – now what? In the case of internal linking (to the resources within our domain), it's best to use relative links instead of absolute links. In practice, it only means that our links shouldn't contain the entire domain name, for example, the address "https://www.ourdomain.pl/article" can be safely linked as "/article". This way we'll avoid similar problems in the future.

Another case may be external linking. Perhaps other websites link to ours? A popular marketing method is to buy paid entries on third-party web pages that link to ours. If we’ve used such services, it's worth contacting the owners of these websites with a request to update the entry with the new address of our web page. It’d be a pity if after a while it turned out that the ad we bought leads to the wrong website or a non-existent redirection, right?

3. Making type 301 redirects from the old domain to the new one

Speaking of redirects, another very important element is their correct configuration and preparation for a new domain. The redirects that we probably want to use are marked with the 301 code. They are important especially for the robots scanning our web page. Thanks to this, they know that the website has changed its address, but it's still the same web page. This way we'll save ourselves the trouble, and we won’t have to worry that our Google rank will drop.

To be sure that all redirects are working properly, it's a good idea to create and compare sitemaps for our current and future domains. Also, we should keep in mind to notify Google about changing the website domain so that they know that the sudden change is intentional and doesn't involve any attack on our page. For this purpose, we use the Google Search Console tool. A detailed description of this procedure can be found on the Google for developers website.

4. Replacing the domain in the configuration of external analytical and marketing scripts

Another very important step when changing a website domain is realizing that we don't exist in a vacuum. The modern Internet is primarily a large network of dependencies and connected systems. As website owners, we need to know what external tools our web page utilizes, which of them are used, and how they were implemented. Tools such as Salesforce, Google Analytics, MaxTraffic, or Hotjar often base their configuration on the domain. We have to make sure that these tools won’t stop working after switching to the new domain. Due to the fact that there are many such tools, we aren’t able to describe each case separately, but we can advise you on how to efficiently prepare what's needed. First of all, we have to:

  • consult with the team about what tools we use,
  • prepare the list of these tools,
  • verify their configuration and whether the domain change may in any way affect their proper operation,
  • check if our system communicates with any external API (if so – in what form the authentication takes place).

If the external tools use the extremely popular Google Tag Manager, it may be a good idea to create a copy of the container we’re using, with the tool configuration prepared for the new domain. This way, when publishing the website on a new domain, we'll only have to change the container's ID, which will minimize the potential downtime of some scripts.

5. Making sure that the new domain has been propagated to all DNS servers

ATTENTION! Propagating our domain may take some time. It's good to give ourselves one to two days from the moment of purchasing and connecting the domain to its proper "spreading" over all DNS servers. The last thing we want is for the website not to be available everywhere after changing the domain. We assume that the domain change isn't a sudden whim, and its implementation within one day isn't necessary. It should definitely be a well-thought-out and well-planned process, so the more time we give ourselves for propagating our new domain, the better effects we'll achieve.

6. Changing website domain for a Drupal web page

Time for some practice. What can a domain change look like in the case of Drupal? The process itself is extremely simple but we should remember about a few details in order to change our domain quickly and safely.

We should bear in mind that our server and the way it's configured have a significant impact on how this operation will look like. Before starting any work, it's worth consulting our plan with the person responsible for our network infrastructure and maintaining the website on the server. This can greatly affect what steps we'll need to take to change the domain. Unfortunately, every case is slightly different, and the things we'll present are only general information.

First of all, it's a good idea to review our entire code in search of our old domain. Perhaps it's hard coded somewhere for some reason. In such a case, it should be replaced with a new one.

Another step is verifying our configuration and installed modules. Some of them may still refer to the old domain – in such a case we'll also need to update these files.

In the case of a multisite installation, the user's files are located in the olddomain.com/sites/olddomain.com/files directory. We have to change it in the module configuration so as to avoid the file address newdomain.com/sites/olddomain.com/files on the new website.

To redirect all traffic from the old domain to the new one, we should also add an entry to our .htaccess file (most often we'll find it in the root folder of the web page). The code we add will redirect all addresses from the old domain to the new one. Example:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTP_HOST} ^staradomena.com$ [OR]
  RewriteCond %{HTTP_HOST} ^www.staradomena.com$
  RewriteRule (.*)$ http://www.nowadomena.com/$1 [R=301,L]
</IfModule>

Once the redirect works, we'll need to rebuild our sitemaps. This can be done in different ways, depending on the module we're using. In the case of the most popular XML sitemap module, we can do it directly in the module's configuration options. This is important because the sitemap is used by the robots scanning the website, which has a direct impact on our visibility and ranking in search engines.

The last step will be to clear the Drupal cache. It's not always a necessary step, but it can help, and it certainly won't spoil anything, so it's good to do it. We can clean the cache in several ways. The most popular are using the drush cr command or a manual cleaning in the UI at: /admin/config/development/performance.

Changing website domain - summary

The possible effects of the process of changing a website domain may strike fear in many people. It's good to keep in mind that we aren’t the first to face such a challenge and it's a feasible and simple thing – if we do it wisely and in the right way. The steps we’ve presented can be a good way to get accustomed to the topic and familiarize yourself with the most important and crucial elements of such an operation. The more work we do before the domain change itself, the smoother and painless the process will be.

Need help changing your Drupal website domain? Our Drupal support team can guide you through the entire process.

3. Best practices for software development teams