ORC Webhosting GmbH Landquart/Switzerland

How to manage domain redirections in cPanel?

Introduction

The process of creating a Visitors from a web address to another is considered to be Forwarding denotes. Technically, redirection takes place at the web server level, since it is responsible for receiving and responding to web requests for a website. Therefore, to set up redirection, the web server must be instructed to redirect the visitor to a specific domain or URL each time it is accessed. This is usually done by editing a special file with instructions for the web server called ".htaccess". This file is located in the document root of each domain associated with your web hosting account. Editing it requires special knowledge of web server rules syntax. Since not everyone is familiar with this syntax, cPanel provides a feature that lets you easily set up and manage redirects without writing a single line of code.

Video tutorial: How to set up domain forwarding?

The Forwarding function in cPanel

Before you can continue with this tutorial, you must log in to the Register cPanel. To do this, please follow our tutorial "Access to cPanel". If you are already logged in or know how to access cPanel, please continue with these instructions.

As soon as you are logged into cPanel, please search for the "Domains" function group. In this group you should find the "Redirects" function. As soon as you see it, please click on it.

set up domain forwarding in cpanel
Domain redirections in cPanel

cPanel directs you to a new "Redirects" page where you can manage all aspects of this feature.

To add a redirect in cPanel

Let's start with adding a new forwarding. The first section you see on the Redirects page is called Add Redirect and is used to configure a single redirect. Of course, you can use this section multiple times to add as many redirects as you like, but please note that only one redirect per domain or URL will work.

The following configuration fields are available in this section:

Type - Select the type of forwarding.

Permanent (301) - This redirect tells the visitor's browser that it is a permanent redirect, which means that the browser must store it in its records.

Temporary (302) - This redirection is used when you want to redirect the visitor to a new domain or URL only temporarily. Please note that the visitor's browser will NOT remember this redirect.

https?://(www.)? - Select here the name of the domain for which you want to set up this redirection. Please note that by default the value "All public domains" is selected. If you keep this setting, all domains you have added to your account will be redirected, which is very unlikely.

/ – This field is used when you want to redirect a request to a file or folder. For example, if you want to redirect domain.com/blog/ to blog.domain.com, enter "blog/" in this field, since this is the URI to redirect. The same is true if you want to redirect a request to a file. For example, if you want to redirect a request from domain.com/blog.html to blog.domain.com, enter "blog.html" in this field.

Redirection to - Enter here the full URL to which you want the visitor to be redirected. For example, if you want to redirect a visitor from domain.com to neuedomain.com, enter "https://neuedomain.com" or even the URI "https://neuedomain.com/blog/" in this field if it exists. Please note that you must enter the full URL, including the protocol and the URI.

www. - redirection - Here you can specify whether the visitor must enter www before the forwarded domain name or not.

Wildcard redirection - When this option is selected, the web server is instructed to redirect all requests to a file or URI associated with the configured domain to the new address, but with the same file or URI. For example, if you want to redirect domain.com/blog.html to new-domain.com/blog.html, enable this option and whatever file is requested from domain.com will be redirected to the same file, but for new-domain.com.

To add the configured redirection, please click the "Add«.

create domain redirect in cpanel
Add your first domain redirection

cPanel then creates the configured forwarding and displays a status message whether the forwarding was created or not.

Manage current redirects in cPanel

Now that you know how to add a new redirect, let's look at what you can do with the redirects you already have. The second section of the Redirects page is called Current Redirects. In this section you will find a table that contains all configured redirects as data rows. Several columns of information are displayed for each forwarding. Let's take a look at it.

Domain - The actual domain name that was redirected.

Directory - If redirection is configured for a specific directory of the redirected domain.

Regular expression - If you have configured regular expression redirects, cPanel will redirect all requests that match that regular expression.

Redirect URL - This is the URL to which visitors will be redirected when they access the redirected domain or URL.

HTTP Status Code - The HTTP status code of the redirect.

Type - The type of redirection considering the status code. As we have already explained, cPanel supports only permanent or temporary redirections.

www available - If you have configured the redirection to redirect visitors who have inserted the www. prefix before the redirected domain name.

Wildcard - Here you can see information about whether wildcard forwarding was used or not.

Actions - The only available action you can take on a redirect is to actually remove it. Please note that redirections cannot be edited. To edit a redirect, you must remove it and then add it again.

current domain redirection in cpanel
Current domain redirections

As you can see, managing redirects for your domains is quite a simple task, but understanding how redirects actually work is often difficult for non-technical users. So, if you are not sure how to configure redirection for your domains, don't hesitate to contact our technical support so that we can help you with this project.

We have other interesting topics for you:

How do I manage the File Manager in cPanel

How do I create a Google Analytics account

More Interesting articles you can also find in our blog

Register your domain and get started!

Unleash your online potential - register your desired domain and lay the foundation for your digital success!

Register domain
Hat Ihnen diese Anleitung geholfen?

Fast Wordpress hosting

Your WordPress deserves a home that is as unique as your content. Discover hosting that is tailored to the needs of WordPress!