1. Home
  2. Knowledge Base
  3. cPanel
  4. Domains
  5. Using the cPanel Domains Feature – “Redirects”

Using the cPanel Domains Feature – “Redirects”

This article assumes you are already logged in to cPanel. For details on how to log in to cPanel, follow this guide.

Introduction to the Redirects Feature in cPanel

cPanel Redirects plays an important role in website management. It allows you to direct visitors from one web page to another, ensuring they always find the information or page they are looking for. This feature is especially useful when you update your website, remove pages, or move to a new domain.

Quick Start Guide to cPanel Redirects

Creating a Redirect

Step-by-Step Process:

  1. Access Redirects: In your cPanel dashboard, locate and click on the “Redirects” option under the Domains section.
  1. Choose Type: Select the type of redirect – Permanent (301) or Temporary (302). Permanent redirects inform search engines that the page has moved permanently, while temporary redirects are for short-term changes.
  1. Configure URL: Specify the URL you wish to redirect from and the destination URL where you want to redirect visitors.
  1. Advanced Options: Choose whether to redirect with or without the ‘www’ prefix.
  2. Add Redirect: Once configured, click ‘Add Redirect’ to activate it.

Important: If you use a third-party application or content management system to add a redirect, such as WordPress®, the redirect may not function properly. Contact the SmartHost customer support team if you require any assistance with setting up Redirects.

In-depth Guide to cPanel Redirects

In this in-depth section, we will explore the Redirects feature of cPanel, providing SmartHost users with a comprehensive understanding of how to effectively manage and implement redirects on their websites.

Detailed Overview of Each Option

Type of redirect

In cPanel, the Redirects feature offers two primary types of redirects: Permanent (301) and Temporary (302). Understanding the differences and appropriate use cases for each is necessary for SmartHost users to manage their website’s navigation effectively.

Permanent Redirect (301)

  • Purpose: A 301 redirect is used when a web page has been permanently moved or replaced. This is the most common type of redirect for pages that have undergone a permanent change, such as domain changes or long-term restructuring of a website.
  • Impact on Search Engines: This redirect communicates to search engines that the original page’s content has been permanently moved to a new location. As a result, search engines update their index to reflect the new URL, transferring the SEO value from the old page to the new one.
  • Typical Use Cases:
    • Changing your domain name and needing to redirect all traffic from the old domain to the new one.
    • Permanently moving or replacing content from one URL to another within your website.
    • Redirecting old product pages to new ones when the product has been updated or replaced.

Temporary Redirect (302)

  • Purpose: A 302 redirect is used when a page is temporarily moved or under maintenance. It is useful for temporary situations where you intend to bring the original page back to its original URL at some stage.
  • Impact on Search Engines: Unlike the 301 redirect, a 302 tells search engines that the move is temporary, so they continue to index the original URL and do not transfer SEO value to the new URL.
  • Typical Use Cases:
    • Temporarily redirecting a main page while it is under maintenance or being updated, to subsequently revert it back to the original URL.
    • Conducting A/B testing where you temporarily redirect users to a new page to test new designs or content.
    • Seasonal promotions or events where a temporary page is used for a short period.

A well-implemented redirect strategy ensures that visitors always find the right content and that the website maintains its SEO strength during changes or updates.

Configuring URLs

The “Configure URL” section of the cPanel Redirects feature is where you specify the URLs for the redirect. This section is essential for defining the source and destination of the redirect, ensuring that users are directed to the correct location.

Specifying the Source URL (From URL)

The “From URL” field is where you enter the original URL that you want to redirect from. This could be the URL of a deleted page, a page that has been moved, or a page that you want to redirect to another domain. For example, if you want to redirect the URL smarthostdemo.ie/old-page to smarthostdemo.ie/new-page, you would enter smarthostdemo.ie/old-page into the “From URL” field.

Specifying the Destination URL (To URL)

The “To URL” field is where you enter the URL that you want to redirect users to. This is the destination where you want visitors to be sent after being redirected from the source URL. For instance, if you want to redirect smarthostdemo.ie/old-page to smarthostdemo.ie/new-page, you would enter smarthostdemo.ie/new-page into the “To URL” field.

Handling ‘www’ Prefixes (www-Handling)

The “www-Handling” option allows you to specify how you want to handle URLs with or without the ‘www’ prefix. This is particularly important for websites that have both ‘www’ and non-‘www’ versions of their domain names. You can choose to:

  • Redirect with www: This option redirects users to the ‘www’ version of the destination URL, even if the source URL doesn’t have the ‘www’ prefix. For example, if smarthostdemo.ie/old-page is redirected to smarthostdemo.ie/new-page, this option would redirect users to www.smarthostdemo.com/new-page.
  • Redirect without www: This option redirects users to the non-‘www’ version of the destination URL, even if the source URL has the ‘www’ prefix. For example, if smarthostdemo.ie/old-page is redirected to smarthostdemo.ie/new-page, this option would redirect users to smarthostdemo.ie/new-page.
  • Redirect based on User Preference: This option allows users to choose the version of the destination URL they prefer, based on their browser settings or prior visits to the site. This option maintains user choice and doesn’t force a specific URL format.

Wild Card Redirects for Entire Directories

In addition to individual URLs, you can also create wild card redirects to manage entire directories. This means that all pages within a particular directory will be redirected to the specified destination URL. For example, if you want to redirect all pages from /old-site/ to /new-site/, you would enter /old-site/* into the “From URL” field and /new-site/* into the “To URL” field.

By understanding the “Configure URL” section, you can effectively define the source and destination of redirects, ensuring that users are redirected to the correct location and that your website’s navigation remains seamless.

Examples for Better Understanding

  • Scenario 1: Redirecting a deleted page.
    • If you delete smarthostdemo.ie/old-service, you can set a 301 redirect to smarthostdemo.ie/new-service, guiding visitors to the updated service page.
  • Scenario 2: Seasonal changes.
    • For a temporary holiday page, use a 302 redirect from smarthostdemo.ie/main-product to smarthostdemo.ie/holiday-special, and revert back after the season.

Summary

The Redirects feature in cPanel is a powerful tool for managing website navigation and ensuring that visitors always find the right content. It allows you to create permanent (301) and temporary (302) redirects, specify the source and destination URLs, and handle URLs with or without the ‘www’ prefix. You can also create wild card redirects to manage entire directories.

For further guidance and detailed technical instructions, refer to the official cPanel documentation: https://docs.cpanel.net/cpanel/domains/redirects/

Frequently asked Questions about Redirects

1. What is a redirect?

A redirect is a method of sending users from one URL to another. This can be useful for a variety of reasons, such as when a page has been moved or deleted, or when you want to improve SEO for a new page.

2. What are the two types of redirects?

There are two primary types of redirects: permanent (301) and temporary (302). Permanent redirects are used when a page has been permanently moved or replaced. Temporary redirects are used when a page is temporarily moved or under maintenance.

3. What is the difference between a permanent and temporary redirect?

The main difference between a permanent and temporary redirect is how search engines handle them. When a search engine encounters a permanent redirect, it updates its index to reflect the new URL, transferring the SEO value from the old page to the new one. When a search engine encounters a temporary redirect, it does not update its index, and the old URL retains its SEO value.

4. What are the typical use cases for permanent redirects?

Some typical use cases for permanent redirects include:

  • Changing your domain name
  • Permanently moving or replacing content from one URL to another within your website
  • Redirecting old product pages to new ones when the product has been updated or replaced

5. What are the typical use cases for temporary redirects?

Some typical use cases for temporary redirects include:

  • Temporarily redirecting a main page while it is under maintenance or being updated
  • Conducting A/B testing where you temporarily redirect users to a new page to test new designs or content
  • Seasonal promotions or events where a temporary page is used for a short period

6. What are the benefits of using redirects?

There are several benefits to using redirects, including:

  • Ensuring that visitors always find the right content
  • Improving SEO for your website
  • Reducing bounce rates
  • Preventing 404 errors

7. What are the potential issues with redirects?

There are a few potential issues with redirects, including:

  • If you use a redirect incorrectly, it can cause problems with SEO and user experience.
  • Redirects can take some time to propagate, so it may take a few weeks for your website to rank for the new URL.
  • If you remove a redirect, you may lose SEO value for the old URL.

Additional Tips

  • Contact SmartHost customer support if you need any assistance with setting up redirects.
  • Use redirects sparingly and only when necessary.
  • Regularly review your redirects to ensure they are still accurate and up-to-date.
Was this article helpful?

Related Articles

Go to Top