Forward my domain

In many ways, domain forwarding works like a regular web page redirect. It’s been around for a while, and you are usually presented with multiple different mechanisms for setting it up. Choosing your approach is not a decision you should take lightly, as it can have a not insignificant impact on your website’s performance.

The thing you need to pay attention to the most is the type of redirect being set up. Registrars and hosting providers often let you configure domain forwarding through a graphical user interface without telling you how exactly they’re redirecting users.

Generally speaking, domain forwarding can involve two types of HTTP redirection:

  • 301 redirect – the user’s browser is informed that the content has been moved permanently
  • 302 redirect – the server responds with a “found” HTTP response, indicating a temporary redirect

There’s no difference between the two in terms of user experience, but for SEO purposes, it’s essential to ensure your domain forwarding is set up via a 301 redirect. The best way to configure it is to modify the .htaccess file in your hosting account.

First, make sure your domain is pointed to your ScalaHosting account. If you’ve recently modified its DNS settings, you might need to give it up to 48 hours for the changes to propagate throughout the world.

Use an FTP client or your control panel’s File Manager to open the document root folder of your domain (by default, it’s public_html). Modifying the .htaccess file can break your website, so before making any changes to it, it’s important to have a backup, either locally or on the server.

Add the following code to the .htaccess file:

  • RewriteEngine on

RewriteCond %{HTTP_HOST} ^domain1.com [NC,OR]

RewriteCond %{HTTP_HOST} ^www.domain1.com [NC]

RewriteRule ^(.*)$ https://domain2.com/ [L,R=301,N]

Swap domain1.com for your domain and domain2.com for the domain you want to forward to and save the changes to set up the redirect. If you don’t see it working immediately, you might need to clear your browser’s cache.

If you have any other questions or issues, feel free to get in touch with our technical support experts, who will be happy to assist you further.

Rado

Author

Working in the web hosting industry for over 13 years, Rado has inevitably got some insight into the industry. A digital marketer by education, Rado is always putting himself in the client's shoes, trying to see what's best for THEM first. A man of the fine detail, you can often find him spending 10+ minutes wondering over a missing comma or slightly skewed design.

Write a Comment

Required*