Creating a URL redirect.

Watch the movie tutorial here.

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.

  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://hostgator.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.


Article Comments

Dianna Roberts
I must have looked at 20 or 30 websites from Google search and couldn't find anything useful. It was all right here. Lesson learned.

Mellissa
I have tried this method several times and it only works when I type in the URL without the www. even though I marked it as "redirect with or withing the www."

HostGator
Likely, you need to wait for DNS propagation to finish.

After that, you may have conflicting lines of code in your .htaccess file. Please contact our support via phone or live chat to get personalized help.

OdinKara
I've bought two domain names from HostGator- a ".net" and ".com". The -net version is my primary, and I want to redirect the -com to it. However, in the cPanel I can only select the .net from the drop-down list. What should I do?

HostGator
Sounds like you want to make the .com domain into a Parked Domain.

Please search "What is a parked domain? How do I create and delete one?"

http://support.hostgator.com/articles/cpanel/what-is-a-parked-domain-how-do-i-create-and-delete-one

Andrew
what if its not my primary domain i want redirected, but something like mail.domain.org going to gmail? how would I do that?

HostGator
When you select the appropriate domain name from the drop-down (step 3), you may choose one of your Addon or Subdomains.

So, simply create the subdomain name first, and then you can redirect it.

Rob
I have a domain name through another provider, but I want it to redirect to my hostgator server rather than the original host provider. How can I make sure the domain points here and not to the original server?

HostGator
Name servers. You need to use our name servers (DNS).

igor
i did what you wrote here and when i go to my site i get this message "Firefox has detected that the server is redirecting the request for this address in a way that will never complete."
what do i do?

HostGator
Remove that redirect; it should not exist.

Then research the correct way to accomplish your goal, or contact HostGator via email for advice.

Michael
Do the instructions above require that the domain being redirected use the HG DNS? I can't get the above to work as instructed. Thanks.

HostGator
Correct, the redirect and other website features don't work unless your website resolves to the same HostGator server where your cPanel is hosted.

The easiest way to make your site resolve correctly is to use the HostGator name servers we provided in your welcome email.

technologift
I have one account in hostgator. then i registered domain www.firstdomain.info. i can access with www.firstdomain.com. Then i addon domain with name : seconddomain.com
i redirected seconddomain.com to www.seconddomain.com in "Redirects" icon and also in area "Addon Domains".
but i always get
"Firefox has detected that the server is redirecting the request for this address in a way that will never complete"

Please help me..

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

See more at the related article "Apache mod_rewrite and examples".


Your comments help us keep the knowledge base updated. This is not a medium for support. If you have questions or need help, please contact us via email, phone or live chat for fast assistance.

Post Comment