Vimzaa Knowledgebase
  • Getting Started
  • Virtual Private Servers
    • What is Virtual Private Server
    • Getting Started With Linux
      • An Introduction to the Linux Terminal
      • Basic Linux Navigation and File Management
      • An Introduction to Linux Permissions
      • An Introduction to Linux I/O Redirection
      • Linux Permissions Basics and How to Use Umask on a VPS
    • Connect with SSH
      • How to Add SSH Keys to VPS
      • SSH Essentials: Working with SSH Servers, Clients, and Keys
    • How To Edit the Sudoers File on Ubuntu and CentOS
    • Introduction to Nginx and LEMP on Ubuntu
      • Initial Server Setup with Ubuntu
      • Installing LEMP Stack on Ubuntu 14.04
      • Installing LEMP Stack on Ubuntu 16.04
    • Anti-Spam Best Practices
  • cPanel Hosting
    • Cloudflare
    • cPanel - Advanced
      • How to add and manage cron jobs / scheduled tasks in cPanel
      • How to track DNS using cPanel
      • How to create custom ‘error pages’ in cPanel
      • How to flush your local machines DNS Cache
      • How to use the Google Public DNS for faster DNS lookups
      • How to check if your domain has ‘propagated’ following DNS changes
      • Install Wildcard SSL Certificates using LetsEncrypt with cPanel
      • Correct SPF Records
      • Check processes or users with high iowait (99.99%) from Cloudlinux Logs
      • How to tune MySQL on a cPanel server with MySQLTuner
      • Clear disk space on cPanel Server by removing backups, trash etc
      • Add monitoring script to server for monitoring top, iostat etc
      • Testing your site before ‘go-live’ by editing your hosts file
    • cPanel - Domains
      • How to use the Site Publisher in cPanel
      • Managing addon domains in cPanel
      • What is the difference between addon domains and ‘alias’ domains?
      • Managing subdomains in cPanel
      • Managing domain aliases in cPanel
      • Managing domain redirects using cPanel
      • How to use the Simple Zone Editor in cPanel for managing your DNS Records
      • How to use the Zone Editor within cPanel to manage your DNS records
      • How to redirect all domain ‘alias’ to the main domain using cPanel
      • How to enable Cloudflare on your cPanel account
      • How to check what nameservers a domain is using
      • How to create Custom Nameservers / Vanity Nameservers
      • How do I transfer a domain name to Vimzaa?
    • cPanel - Managing Databases
      • Managing a MySQL Database in cPanel with phpMyAdmin
      • Manage MySQL Database in cPanel
      • Simplified database creation with the cPanel MySQL Wizard
      • Managing MySQL databases remotely using ‘Remote MySQL’ in cPanel
    • cPanel - Managing Email Accounts
      • Managing email accounts with cPanel
      • How to create and manage email forwarders using cPanel
      • Managing email routing with cPanel
      • Change Your E-Mail Account Password
      • Improving mail deliverability (SPF & DKIM)
    • cPanel - Managing Files
    • cPanel - Metrics
    • cPanel - Software and Applications
    • cPanel - Security
    • SiteBuilder Pro
    • Enable or disable PHP modules
    • How can I migrate my cPanels to Vimzaa Website Hosting?
    • SSH Access to cPanel Servers
    • How do I add another domain to my Hosting Account?
    • How do I access WHM (Web Host Manager)?
  • Plesk Hosting
    • An Introduction to Plesk
    • Getting Started with Plesk
      • How to login to Plesk for the first time
      • The Plesk User Interface Explained
      • Understanding Subscriptions in Plesk
      • How to upload content with Plesk
      • How to manage mailboxes / mail accounts with Plesk
      • Managing Web ApplicationsManaging Web Applications
    • Plesk Tutorials
      • A basic getting started guide to creating your first site with Plesk
      • How to manage DNS and nameservers using Plesk
    • Plesk Funtionality - Explained
      • Managing your User Account in Plesk
      • Managing your Web Hosting with Plesk
  • Game Servers
    • Setup Teamspeak 3 Server on Linux
    • Installing SteamCMD for Steam Game Servers
  • SSL Certificates
  • Domains
    • Can I register or transfer my domain to Vimzaa
    • Can I buy a domain name together with a web hosting plan
    • Default nameservers for shared webhosting
Powered by GitBook
On this page
  • Overview
  • Add a redirect
  • Remove a redirect
  • Search your redirects
  1. cPanel Hosting
  2. cPanel - Domains

Managing domain redirects using cPanel

PreviousManaging domain aliases in cPanelNextHow to use the Simple Zone Editor in cPanel for managing your DNS Records

Last updated 6 years ago

A redirect allows you to make one domain redirect to another domain, either for a website or a specific web page. For example, create a redirect so that www.example.com automatically redirects users to www.example.net.

cPanel > Home > Domains > Redirects

Overview

The Redirects interface allows you to send all of the visitors of a domain or particular page to a different URL.

For example, if 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.

Warning:

This feature will not function if your System Administrator enabled ™.

Add a redirect

To add a redirect, perform the following actions:

  1. Select a redirect type from the Type menu.

    • Permanent (301) — This option notifies the visitor’s browser to update its records.

    • Temporary (302) — This option does not update the visitor’s bookmarks.

  2. Select a domain name from the menu, or select * *All Public Domains* * to redirect all of the domains that your cPanel account controls.

  3. In the text box to the right of the domain selection menu, enter the rest of the URL from which you wish for the server to redirect visitors. For example, if you wish to redirect http://example.com/directory.file.html to another URL, enter directory/file.html in this text box.

  4. In the redirects to text box, enter the URL to which you wish to redirect users.

    Important:

    You must specify a protocol in this text box. For example, http://, https://, or ftp://.

  5. Select one of the following options:

    • Only redirect with www. — This option only redirects visitors who enter the www. prefix before the domain name part of the URL.

    • Redirect with or without www. — This option redirects all users, regardless of whether the visitor enters the www. prefix before the domain name part of the URL.

    • Do Not Redirect www. — This option does not redirect users who enter the www. prefix before the the domain name part of the URL.

  6. Select the Wildcard Redirect option if you wish to redirect all files within a directory to the same filename in the new directory.

    • For example, if you enable the Wild Card Redirect option and example1.com redirects to example.com, then a visitor who tries to access the http://example1.com/pic.jpg URL redirects to the http://example.com/pic.jpg URL.

  7. Click Add.

    • To test the redirect, click the link under Directory in the Current Redirects table. If you properly configured the redirect, the system directs you to the original domain.

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. When you add a redirect with cPanel interface, the system places redirect rules at the bottom of the .htaccess file. Some third-party applications ignore the rule that you add, because those applications only read rules and configurations that their section of the .htaccess file contains.

In the following example:

  • drupal.user.example.com represents the URL to redirect.

  • http://cpanel.net/ represents the URL to which to redirect.

    12345678

    <IfModule mod_rewrite.c>RewriteEngine onRewriteBase /RewriteRule ^index\.php$ - [L]RewriteCond %{HTTP_HOST} ^drupal\.user\.example\.com$ [OR]RewriteCond %{HTTP_HOST} ^www\.drupal\.user\.example\.com$RewriteRule ^cptest$ "http\:\/\/cpanel\.net\/" [R=301,L]</IfModule>

Note:

You cannot edit a redirect. To modify a redirect, you must delete it, and then recreate it.

Remove a redirect

To remove a redirect, perform the following steps:

  1. Click Delete next to the redirect that you wish to remove.

  2. Click Yes.

Search your redirects

To search your redirects, perform the following steps:

  1. Enter the search criteria in the Search text box.

  2. Click Go.

The interface will list the redirects that match your search criteria.

To sort your list of redirects, click the appropriate table heading.

The following example displays the configuration that you must add to the top of the .htaccess file to add a redirect for the content management system.

ModSecurity
Drupal