A redirect is a process by which we divert a user from the URL they enter in their browser to a different one.
These redirects are usually done for a variety of reasons: we restructure a website and change the URL of the pages, or the content is no longer available, or a migration from HTTP to HTTPS is made …
Usually redirection occurs automatically, and it can be done in different ways. The most common are:
- HTTP redirects
- Permanent redirection:
Permanent redirects (redirects with code 301) serve to indicate that the original URL has been permanently moved to the URL which it is redirected to. From the SEO point of view, this is usually the most suitable type of redirection.
2. Temporary redirection:
Temporary redirects (redirects with code 302 and, occasionally, 307) are used when the URL change is not final. Due to some temporary event, a redirect is made that will disappear in the near future.
These are not recommended from the SEO point of view, since the search engines do not take them into consideration.
They are made by including a series of commands and lines of code on the pages. An example might be:
window.location = ‘http: //example.com’
These are tables inserted on a page on which content from other different pages is shown. Iframes become something like a window through which content, accessible from another URL, can be seen.
They are not recommended from the SEO point of view. In fact, Google may come to consider using iframes to be a “Black Hat SEO” technique.
From the point of view of SEO positioning, it is recommended to always perform HTTP redirects. Within these, the permanent ones (301) are usually the best option. This is because through them, all the authority of the initial page is transmitted to the page to which the redirection is made. In this way, you avoid generating loss of organic positioning in the search engines.