Add a redirect

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

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

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.

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

Warning

title

Important:

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

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.

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.

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.

Panel

borderColor

#d9d9d9

bgColor

#F2F2F2

borderStyle

solid

In This Document

Toc no bullet

exclude

Document|Hosting

Related Documentation

Content by Label

showLabels

false

max

5

showSpace

false

sort

modified

operator

AND

cql

label = "domains" and label = "cpanel" and space = currentSpace()

labels

apiguide

For Hosting Providers

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.

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

cPanel, WebHost Manager, and WHM are registered trademarks of cPanel, Inc. for providing its computer software that facilitates the management and configuration of Internet web servers. ®2018 All rights reserved.