Redirecting a user accessing a specific URL to another. The reason for the redirect can be different, most often used in cases where the page you are looking for has changed its address, has been deleted, or the site has changed its address.
The main purpose of a redirect is not to lose the visitor and transfer him to the right page. It can also be used by attackers for fraudulent purposes, for example, when replacing a site.
There are two types of redirects: temporary and permanent. 301 is a permanent redirect that tells the search engine that the information at the specified address has been permanently transferred to the new URL.