Creating and Managing Redirects in cPanel

This guide explains how to create, manage, and remove redirects in cPanel. Redirects allow you to forward visitors from one URL to another, which is useful for reorganising your site, fixing broken links, or directing traffic to new pages or domains.

 

1. What Redirects Are and When to Use Them

A redirect automatically sends visitors from one URL to another.

Common uses include:

  • Moving a page to a new location
  • Redirecting old URLs after a site redesign
  • Forwarding a domain to another domain
  • Redirecting www to non-www (or vice versa)
  • Redirecting HTTP to HTTPS

Redirects help maintain SEO value and prevent visitors from landing on broken pages.

 

2. Accessing the Redirects Tool

  1. Log in to your cPanel dashboard.
  2. Scroll to the Domains section.
  3. Select Redirects.

You will see options to create new redirects and manage existing ones.

 

3. Creating a New Redirect

  1. In the Add Redirect section, choose the redirect type:
    • Permanent (301): Recommended for most cases. Search engines update their index.
    • Temporary (302): Use if the change is not permanent.
  2. Choose the domain you want to redirect from.
  3. Enter the path (optional):
    • Leave blank to redirect the entire domain.
    • Enter a folder or page (for example, /blog).
  4. Enter the destination URL you want visitors to be sent to.
    • Example: https://example.com/new-blog
  5. Choose whether to redirect www versions or all versions.
  6. Click Add.

Your redirect will now be active.

 

4. Types of Redirects You Can Create

Domain to Domain Redirect

Redirects all traffic from one domain to another.
Example:
example.net -> example.com

Page to Page Redirect

Redirects a specific page.
Example:
example.com/old-page -> example.com/new-page

Folder Redirect

Redirects an entire directory.
Example:
example.com/blog -> example.com/articles

Force HTTPS Redirect

Handled separately in the Domains section by enabling Force HTTPS Redirect.

 

5. Managing Existing Redirects

At the bottom of the Redirects page, you will see a list of all active redirects.

To remove a redirect:

  1. Find the redirect in the list.
  2. Click Delete.
  3. Confirm the removal.

Redirects take effect immediately after deletion.

 

6. How Redirects Work Behind the Scenes

cPanel stores redirects in your .htaccess file.
This means:

  • Redirects apply instantly
  • They work at the server level
  • You can also edit .htaccess manually if you prefer

If you manually edit .htaccess, be careful not to break existing rules.

 

7. Troubleshooting Common Redirect Issues

Redirect Not Working

  • Ensure the destination URL includes http:// or https://.
  • Clear your browser cache.
  • Check for conflicting rules in .htaccess.

Redirect Loop

  • Happens when a redirect points back to itself.
  • Check both cPanel redirects and .htaccess rules.

HTTPS Redirect Not Applying

  • Use the Force HTTPS Redirect toggle in the Domains section.
  • Ensure SSL is installed.

Wrong Page Redirecting

  • Another redirect may be overriding it.
  • Check for wildcard redirects or CMS-level redirects

Hjälpte svaret dig?

Relaterade artiklar

How to Create and Manage Email Accounts in cPanel

This guide explains how to create, manage, and access email accounts for your domain using...

Using phpMyAdmin to Manage MySQL Databases

This guide explains how to use phpMyAdmin in cPanel to view, edit, and manage your MySQL...

Managing Domains and Subdomains in cPanel

This guide explains how to manage your domains and subdomains in cPanel, including adding new...

Understanding and Using cPanel File Manager

This guide explains how to use the cPanel File Manager to upload, edit, organise, and manage...

Setting Up and Managing FTP Accounts

This guide explains how to create, configure, and manage FTP accounts in cPanel. You will learn...

Powered by WHMCompleteSolution