Redirects

Redirects (as the name suggests) are useful when you need to safely redirect traffic from one domain or address to another. For example, you may need to route all traffic from example.com to foo-example.com or vice-versa. You can also redirect specific pages, such as example.com/info.html to example.com/anotherPage.html.

The concept of redirects is especially useful to prevent users from mistakenly landing on broken links or pages which no longer exist. This is especially true if users are arriving at your website from other websites. Instead of an ‘error 404’ page being displayed, you can instead redirect people straight through to the website or page they are trying to access.

Chillidog Hosting supports use of redirects, and these are typically very easy to setup in your control panel at any time. Generally speaking, redirects setup through your control panel are considered permanent or long-term. If you need to redirect users temporarily (like for website maintenance or for special events or promotions), use the META and Javascript method, outlined below.

Creating a new server-side redirect in CPanel

To create a redirect in your Chillidog Hosting account, follow these steps:

Step 1

Log into your CPanel (control panel) using your normal username and password combination. Scroll down to the section headed **Domains** and click on the **Redirects** button shown. Scroll down to the section headed Domains and click on the Redirects button shown.

Step 2

In the ‘Add Redirect’ form, start by setting the redirect option to either permanent or temporary. A permanent redirect will notify the visitor’s browser to update any bookmarks that are linked to the page that is being redirected. Temporary redirects will not update the visitor’s bookmarks.

Next, select the domain name to redirect, from the pulldown menu. Optionally you can add a path and / or page name in the input box. Type in the address that the page needs to redirect to. The Redirect with or without www should be selected by default. Click on the Add button, when done.

It may take a short while for your instruction to be sent to the server and processed. Take care that the redirect links you are using are correct and avoid instances of redirects redirecting back to redirects!

Removing redirects

Simply login to your Chillidog Hosting CPanel and click the Redirects button, located under the Domains subheading. In the table of active redirects you currently have setup, scroll down and find the redirect you want to disable. Click the Remove button, next to the corresponding redirect.

Client-side temporary redirects

These are useful to use if you simply need to redirect visitors temporarily. Start by adding a META and Javascript redirect, to the head section of a webpage like this:


>script< type="text/javascript">// >![CDATA[
window.location.href = 'http://example.com'
// ]]<>/script<

If the META tag does not work, the Javascript will provide a fall-back method of redirection. As an additional safe-guard, you could also provide a link for a visitor see and click in body of the page:

If you are not redirected automatically, please click here.

In all instances, you would just replace ‘http://example.com’ with the URL of the page you want to redirect visitors towards. The complete source code for a page setup with the task of redirecting visitors in a website might look something like this:


>script type="'text/javascript"<
Page RedirectIf you are not redirected automatically, please click here

Differences between a 301 and 302 redirect

It's important to consider the differences between a 301 and 302 type redirect. 301's are *permanent* redirects, whereas 302's are *temporary* redirects. Search engines indexing your website pay close attention to the type of redirects you're using and will change search results to reflect redirect types.

A 301 redirect means that the resource (page) has been moved permanently to a new location. The client or browser should not attempt to request the original location. It should use the new location from now on.

A type 302 redirect means that the resource is temporarily located somewhere else, and the client or browser should continue requesting the original url.

Search engines

Search engines are normally okay with most forms of redirects. In the real world, search engines understand page locations sometimes change and the need to use redirects to improve website accessibility. However if you are seen to be making excessive or aggressive use of redirects, then you could be penalised and see your website demoted or removed from search results. Only use redirects if essential to the function of a website - not as a way to manipulate search engines or sending visitors onto websites they had no intention of visiting.

  • 14 Users Found This Useful
Was this answer helpful?

Related Articles

Creating a SQL database

Creating SQL Databases MySQL is by far one of the widest used and most popular database...

Setup 2-Step Verification

2 step verification (also known as two-factor authentication) adds an extra layer of protection...

Update Contact Information

It is important that your contact details and billing information are kept up-to-date at all...

Upgrade, Downgrade or Cancel Hosting Accounts

You can easily upgrade, downgrade or cancel your Chillidog Hosting account at anytime in your...

Changing Your CPanel Password

You can easily change your CPanel (control panel) password at any time yourself. This is...