Multiple redirects
Redirect means the automatic redirection of users and web crawlers from one URL to another. When the user clicks on the link, or enters the address directly in the search bar, the browser will automatically open another webpage to which the redirect is configured. For example, when the user clicks on a link to site.ru/page1, he can be automatically redirected to site.ru/page2.
Multiple redirects is the term for when such a redirect is used several times to sequence from page to page. For example, by clicking on yoursite.com/page1, the user is redirected to yoursite.com /page2, and then to yoursite.com /page3.
Why you should avoid multiple page redirects?
- Search engines process only a limited number of redirects. According to the data found, Google redirects up to 5 links. If there are more, Google won’t follow the link and will not index the website pages.
- Crawl budget is spent on the multiple redirects.
Crawl budget is the number of pages that a bot crawls and indexes on a website within a given timeframe. It’s important to spend it on priority landing pages. Learn more about crawl budget.
Types of redirects
Redirect 3xx status code: Redirects can have different HTTP status. Different HTTP status codes are used by engines and browsers to understand the type of redirect. Each type of redirect has its own purpose. Optimizers and programmers use 301 and 302 redirects more often than other types of redirects.
Status codes 3xx:
- 300 multiple choices. It is used if the browser needs to make an automatic decision to redirect the user. For example, this code could be used to select language or code.
- 301 moved permanently. It redirects permanently from one URL to another, passing link equity to the redirected page. At the same time, the old URLs disappear from search results, and new ones begin to be indexed. You can find Google's guide to using this redirect here.
- 302 temporary redirect. It is used when you need to redirect temporarily from one page to another. In this case, the old page with all its parameters will remain in the index.
- 303 forces a GET request to the new URL. It is used to prevent pages from being updated that contain information for one-time use only.
- 304 loads the data from the browser cache at the URL when the user reloads the page. It is used when the content on the page remains unchanged.
- 305 response means that the requested resource is only available through a proxy.
- 306 redirect is not used at the moment.
- 307 temporary redirect, same as 302.
Content of the report "Multiple redirects":
- Redirecting URL
- Final URL in the redirect chain
- Information about the number of redirects in the chain
- Button to check the HTTP status
When you click on it, the "View HTTP Headers" window opens:
- In the "URL" field, enter the page address you want to check.
- Select “User-Agent” on behalf of which the request will be made. User agent is an app that uses a specific network protocol. The term is commonly used for applications that access websites, such as browsers and web crawlers.
- Select the code that is preferred by the browser.
- Check the “Show HTML code” if you want to view the content of the HTML page. If unchecked, only HTTP headers will be displayed.
- Click the "Check" button.
- HTTP page header. When checking a redirect, it is important to look at parameters such as page response code (3xx) and the Location field - it will contain the URL to which the redirect was made.
How to fix the issue
The 'too many redirects error' means your page is stuck in a never-ending loop of redirects, never reaching its destination. This is harmful to your site as users can't access the page and crawlers can't crawl and therefore index the page.
If you find multiple redirects on your page there are a few ways to solve the issue:
- Clear the cookies on your browser and try again.
- If that doesn't work try clearing your browser's cache.
- Check you have properly installed your SSL certificate. If SSL has been forced but the certificate has not properly been installed then requests can be sent as HTTP but are constantly redirecting to HTTPS causing the error.
- Use your file manager (such as cPanel) to reset the .htaccess file to its default settings.
- Finally if all else fails, contact your hosting provider to see if they can give any clarity on what is causing the issue.