---
title: "When to Create a 302 Redirect"
description: "Redirects are used for a variety purposes and it is important that you use the appropriate redirect type for your website when it becomes necessary to use them. The two types of redirects are: 301..."
url: https://www.inmotionhosting.com/support/website/302-redirects/
date: 2017-10-17
modified: 2023-07-18
author: "InMotion Hosting Contributor"
categories: ["Website"]
type: post
lang: en
---

# When to Create a 302 Redirect

Redirects are used for a variety purposes and it is important that you use the appropriate redirect type for your website when it becomes necessary to use them. The two types of redirects are:

- **301 redirect** – used for permanent changes to the site URL
- **302 redirect** – used for temporary changes to the site URL

## When you should use a 302 redirect

### When to use a 301 redirect over a 302 redirect

When would you use a 301 over a 302 redirect. Anytime that you need to make a *permanent* change to the URL and you want to make sure that search engines are made aware of the change, then you want use a 301 redirect. For example, if you purchased an SSL Certificate for your website and you need to implement it, then your URL will change from [HTTP to HTTPS](/support/website/ssl/how-to-force-https-using-the-htaccess-file/).

### When to use a 302 redirect over a 301 redirect

The condition in which you use a **302 redirect over a 301 redirect** is when the change is only temporary. This notification prevents search engines from changing search results for that particular URL. A good example of this is if you are testing a change on your website when it is accessible through the internet. A change of a live website page may alter the search results of the site is crawled by the search engine. In this case you do not want the search engine to note that change. The use of a 302 redirect indicates to the search engine that the change is only temporary.

## How to Create a 302 redirect in cPanel

1. [Login to cPanel](/support/edu/cpanel/how-to-log-into-cpanel/)
2. Go to the **Domains** section and then click on **Redirects** ![Domain section](https://www.inmotionhosting.com/support/wp-content/uploads/2017/10/302-redirects_cpanel-main.png)
3. Click on the drop-down menu to select the **Temporary (302)** ![Select 302 redirect](https://www.inmotionhosting.com/support/wp-content/uploads/2017/10/302-redirects_choose-temporary-redirect.png)
4. Fill in the information for the re-direct, then click on **Add** in order to add the redirect. ![Click on Add](https://www.inmotionhosting.com/support/wp-content/uploads/2017/10/302-redirects_302-add.png)

When the redirect is in place make sure that you complete the process for which are using the temporary change of URL. Remember that the change should remain temporary. The redirect should be removed once the need for the temporary URL is complete. For more information please see the tutorial on [Setting up 301 Redirects](/support/website/setting-up-a-301-permanent-redirect-via-htaccess/).
