A crawl of your website will find all pages that are redirected, as well as the pages they are redirected to. Pages that are redirected return a status code of 3xx, which makes them easy to find in the the crawl results.
Here's how to identify any redirection loops on your website by analyzing the series of redirections.
Create a list of all redirected pages
Before starting, you will need to have completed a crawl of your site.
Click on the analysis to view the results, then navigate to the Data explorer. You can find the Data explorer under the Tools menu in the sidebar.
Use the OnCrawl Query Language to list all pages whose "status code category" is "redirect":
Click "Apply filters" to filter the crawl results for only pages that are redirected.
In the list of results, make sure the redirect location is listed. Under the "Add columns" menu, choose "Redirect location".
Remove any additional columns by clicking on the X in the column header.
Export the list of redirections
Use the "Export Data" button at the top of the page to obtain a CSV file of your table.
Check for redirection loops in Excel
The instructions below are for Microsoft Excel. However, most spreadsheets including Numbers for Mac and Google Sheets will offer equivalent functions. Check your program's help with functions in order to modify these instructions.
Open the CSV file in Excel. If Excel is not your default program for CSV files, you can right-click on your file and choose "Open with...", then select Microsoft Excel.
Add columns for successive redirections
You will see a first column labelled "URL", and a second column labelled "Redirect_Location". Rename the second column "Redirect Location 1". Add a third column "Redirect Location 2", a fourth column "Redirect Location 3" and so on.
Use the VLOOKUP function to check whether the redirect locations are also redirected
In cell C2 of the column "Redirect location 2", enter the following function:
This function looks up the exact value in the cell B2 (Redirect Location 1) within the range of columns A and B (URL and Redirect Location 1). If it finds the value in the URL column, it displays the redirect location in the cell C2. If it doesn't find the value in the URL column, it displays #N/A.
Drag the bottom right-hand corner of the cell down to fill in the entire column. The element "B2" in the function should increase automatically for each row. For example, in row 72, the function should read:
Repeat this procedure in column D (Redirect Location 3). The only element of the formula you will need to change is the lookup value. The range (A:B) must stay the same:
Continue to fill in columns until most of the pages are listed as "#N/A".
Identify any redirect loops
You can identify a loop when a line never lists "#N/A" and any page address appears twice in the same line.