The Redirects interface allows you to send all of the visitors of a domain or particular page to a different URL. For example, if you create a page with a long URL, use the Redirects interface to add a redirect from a short URL to the long URL. Visitors can enter the short URL to access the content of the long URL.
In cPanel, a redirect refers to the process of directing website visitors from one URL to another. This is often done for various reasons, such as when you want to redirect users from an old domain to a new one, redirect from HTTP to HTTPS for secure connections, or redirect from one specific page to another.
cPanel provides a user-friendly interface for managing redirects without needing to manually edit server configuration files.
- You cannot edit a redirect. To modify a redirect, you must delete it, and then recreate it.
- If you wish to redirect a domain’s visitors from the insecure version of the website to the secure version, use the Force HTTPS Redirect option on cPanel’s Domains interface (cPanel » Home » Domains » Domains).

Set up redirects in cPanel
- Login to cPanel: Access your cPanel account through your web hosting provider’s portal.
- Locate the “Redirects” option: In the cPanel dashboard, look for the “Redirects” or “Domains” section. The exact location may vary depending on the cPanel version and theme.
- Choose the type of redirect:
- Permanent (301): Use this if you want to inform search engines that the original URL has permanently moved to the new one.
- Temporary (302): Use this for a temporary redirection. It doesn’t signal search engines to update their indexes permanently.
- Select the domain: Choose the domain for which you want to create the redirect.
- Enter the original and destination URLs:
- Type: Choose whether you want to redirect the entire domain or a specific page.
- From: Enter the original URL or page you want to redirect.
- To: Enter the destination URL where you want visitors to be redirected.

- Choose other options if needed:
- You might have options for case-insensitive matching or wildcard redirects. Adjust these according to your requirements.
- Click on “Add” or “Save”: After entering the necessary information, save your changes.
Permanent redirects
The following is a permanent redirect of an entire site from its original location to bestvpshosting.in:
Redirect 301 / http://bestvpshosting.in/
The following is a permanent redirect of a page on example.com to a different page on bestvpshosting.in:
Redirect 301 /original.html http://www.bestvpshosting.in/new.html
Temporary redirects
The following is a temporary redirect of an entire site from its original location to bestvpshosting.in:
Redirect 302 / http://bestvpshosting.in/
The following is a temporary redirect of a page on example.com to a different page on bestvpshosting.in:
Redirect 302 /original.html http://www.bestvpshosting.in/new.html
Redirects via third-party applications
cPanel primarily provides a built-in interface for managing redirects. However, if you’re interested in implementing redirects using third-party applications or scripts, you would generally need to do so outside of the cPanel interface. Here are a few general steps you might follow:
- Identify the Third-Party Application: Choose a third-party application or script that suits your needs. This could be a content management system (CMS) like WordPress, Joomla, or a custom script.
- Install and Configure the Application: Follow the installation instructions for the chosen application. This might involve uploading files to your server, setting up a database, and configuring the application.
- Use Application-Specific Redirect Features: Many CMS platforms have their own built-in features for managing redirects. For example, WordPress has plugins that allow you to set up redirects easily. Refer to the documentation or community support for the specific application to learn how to implement redirects.
- Server Configuration (Advanced): If you have access to server configurations, you might implement redirects at the server level using Apache or Nginx configuration files. This is a more advanced approach and requires knowledge of server administration. You can create rewrite rules in the .htaccess file for Apache servers, for instance.
- Consider Security and Compatibility: Ensure that any third-party application or script you use for redirects is secure and compatible with your server environment. Keep the software up to date to benefit from security patches and improvements.
The .htaccess file is a configuration file that allows you to override server settings for a specific directory and its subdirectories. Here are some examples of common redirects using the .htaccess file
Redirect from HTTP to HTTPS:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Redirect www to non-www:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.bestvpshosting\.in[NC]
RewriteRule ^(.*)$ http://bestvpshosting.in/$1 [L,R=301]

Redirect non-www to www:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^bestvpshosting\.in [NC]
RewriteRule ^(.*)$ http://www.bestvpshosting.in/$1 [L,R=301]

Redirect a specific page:
Redirect 301 /old-page.html http://bestvpshosting.in/new-page.html
Redirect all pages to a new domain:
Redirect 301 / http://bestvpshosting.in/
Before making changes to your .htaccess file, it’s recommended to make a backup to avoid potential issues. Additionally, make sure your server has the mod_rewrite module enabled, as it’s required for these directives to work. If you’re unsure, consult your hosting provider or server administrator.

