In the internet world, a URL redirect allows for one location to be mapped to another, essentially telling the user's browser that the location of the page has now changed, and where they can now find it. This is achieved by providing a virtual ‘link’ between the content’s original location and the new location.
Bulk redirects, as the term suggests, are basically having the ability to handle numerous redirects in a short amount of time. This was a feature Cloudflare has been working on after customer feedback which asked for a number of redirects to be uploaded through an easy-to-use interface.
Basically asking for a simpler way to upload a large number of redirects. URL redirects were typically implemented as page rules within Cloudflare before, and other solutions such as Cloudflare workers were used to achieve the same objective.
With bulk redirects, this new process is much more simplified now and can be managed more easily, all without having the need to write a single line of code.
Although bulk redirects can also be created via API, for the purposes of this blog I will illustrate how to create bulk redirects by importing a CSV file with URL redirects.
In order to create bulk redirects in the Cloudflare dashboard, 3 things need to happen. Users must:
Steps to create a bulk redirect:
The second step is to add URL redirects to the list that was created above in step 1.
In the dashboard, you can enter URL Redirects one at a time, or have the option to import a CSV file containing several URL Redirects.
How to import a CSV file with URL Redirects:
Make sure you follow the right format for lines in the CSV file. For example, the file cannot include a header row with column names.
Almost there. Finally, you need to create a bulk redirect rule to enable the redirects in the list:
In conclusion, Bulk Redirects can be extremely useful when handling a significant number of redirects and require minimum effort.
Sign up to our bi-weekly newsletter for a bite-sized curation of valuable insight from the Sitecore community.