URL redirect methods, forwarders Print

  • 76

URL redirect methods, forwarders

There are several ways to redirect or forward a URL.


Typical 301 redirect

Go to cPanel and click Redirects. This is also known as 301 redirect.

Search engines, like Google, prefer 301 (permanent) redirects. Don't worry, the redirect can be changed and erased.

The 302 (temporary) redirects are less favored, but behave no differently than 301.

WARNING Never create a redirect for domain.com to www.domain.com or from domain.com to domain.com/index.something. Doing either will cause an infinite loop. If you need to control the www and index page, you must use mod_rewrite by adding .htaccess code.

Video tutorial link: http://www.hosticon.com/tutorials/cpanel-x3/cpanel-x3-redirects.html

How to redirect a URL:

  1. Login to cPanel and click the Redirects icon.
  2. Leave the setting as 301 redirect, as this is preferred by search engines.
  3. Select the appropriate domain name from the drop-down.
  4. In the subsequent blank, enter an optional path and file name; this exact name must be typed to trigger the redirect.
  5. In the large blank, enter the full URL for the redirect target; include http:// or https:// (e.g. http://hosticon.com)
  6. Leave the other settings as they are, unless you know why you want to change them.
  7. Click the Add button and you are done.

Congratulations, when someone types the exact name you specified, they will be redirected to the target site you specified.

Note: Some URLS will not work, for example URLs with a question mark (?) or a colon (:) will cause an error.

Warning: Trying to redirect domain.com to www.domain.com will give you a Continuous Loop Error. 

To force the www, you need to use Apache Mod Rewrite, not a 301 redirect.

Masked Forward & HTML Forward

Visit this site to create either.

Note: You can accomplish something similar to a masked forward in cPanel. This is known as a Parked domain, and will show the parked domain name in a browser address bar, while showing your primary domain's web site.


Custom .htaccess redirects

You can add coding to your .htaccess file to customize rewrite and redirect rules. This is an advanced method which is not supported by HostIcon.

A beginner's example of a .htaccess redirect.

A handy tool which generates .htaccess code for you.

Example codes offered by HostIcon.


Advanced Tips

How do I redirect my website to another ip, but still keep my email here?
You must customize your A record. This record controls where you domain's website is hosted.

How do I redirect my subdomains to another site at the DNS level?
This is done with a CNAME record. This record controls each subdomain name like www and mail.domain.com.

How do I redirect my emails to another server?
You must customize your MX record. This record controls to which host your emails will be delivered.


Was this answer helpful?

« Back
© HostIcon. All rights reserved. Logo and name is a registered trademark of Space Technologies.