HostGator.com » Support Portal

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.

Read more in the related article URL redirect, how to create.

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 HostGator.

A beginner's example of a .htaccess redirect.

A handy tool which generates .htaccess code for you.

Example codes offered by HostGator.


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.



Article Comments

Earl Chessher
I've transferred my domain name to HostGator.com where I have a reseller hosting account, and now I want to do a redirect of www.domain.com that will take those who enter www.domain.com in their brower to my new website at www.domainvideo.com

However, when I go to the dropdown menu under redirects in cpanel it doesn't show domain it only shows domainvideo

HostGator
You need to add domain.com as an addon domain, first. Then you can redirect it.

Mick
i need to change a link on a generated page from /img-sys/fill.jpg to images/fill1.jpg. is this possible ? if so how?

HostGator
You must edit the source code. You can do this through cPanel's File Manager.

I strongly advise you to have the original web designer to make the changes, as this can be very simple or very difficult.

Nikki
I have created a sub domian and would like to stop the url from rewriting when you go to the subdomain.

eg.
sub.domain.com redirects to domain.com/sub

I want it the keep the sub.domain.com url - how do I do that?

HostGator
Subdomains do not behave that way by default. You must have a custom code added to your account which makes this happen.

Please email support@hostgator.com with the actual subdomain name, and we will help you.

HostGator
Thank you for your comments. Just a quick reminder that the comments on this page are not monitored by technical support staff, and that for support issues, it is best to contact us by live chat, phone or email so we can assist you right away.

Although comments are not monitored by technical support staff, they are moderated and read by technical writers. Comments will need to be approved by a moderator before appearing.

Our technical writers do read the comments periodically for the purposes of updating the articles, and do appreciate your feedback, suggestions and corrections to the articles themselves, as well as any suggestions or tips for readers of this article. However, support questions posted here are not guaranteed to be replied to in a timely manner or at all. For support issues, it is best to contact our support staff instead by live chat, email or phone.



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