# What is redirection?

### Redirecting the current page to a new page.

![](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2F729vfFhZNbFWAbsw1ZEs%2Fimage.png?alt=media\&token=ac47e5f5-9e85-43b1-9e52-a84d3b3582d2)

### Why do you need redirection?

* To redirect to the new URL when a page's URL changes
* To redirect an invalid subdomain to another domain
* To redirect to another page for log-in or authentication purposes

### There are two types of redirections as follows:

* **Redirection 301**

&#x20;     \- Redirect immediately without processing any server-side or client-side code

* **Redirection 302**

&#x20;    \- Redirect temporarily using a script or html tag
