Bulk import 301 redirects

I have to set up about a bajillion redirects this weekend. Would be awesome to have a similar feature to the CMS import to be able to add redirects in bulk.

  • Chris Scott
  • Jul 1 2017
  • Shipped
  • Jun 26, 2024

    Admin response

    Streamline your 301 redirect management with CSV support

    Now you can save time by managing your 301 redirects with CSV import, export, and the ability to search and sort. As part of this release, we’ve also added pagination in the redirects table as well as the ability to search and sort 301 redirects in Webflow. One important note: CSV imports will overwrite pre-existing 301 redirects (versus appending them).

    Read announcement ↗︎

  • Rodrigo Demetrio commented
    05 Feb 14:45

    up

  • Haris Barki commented
    18 Jan 18:50

    Browser console, pure javascript way to do

    var redirectFromField = document.getElementById('form-group-23-35');
    redirectFromField.focus();
    document.execCommand('insertText', false, '/old');

    var redirectToField = document.getElementById('form-group-24-36');
    redirectToField.focus();
    document.execCommand('insertText', false, '/new');

    var redirectBtn = document.getElementsByClassName('--styled-icqbRT --pick-bisZcG wf-13ezjsp')[0];
    redirectBtn.click()

  • David Chapman commented
    15 Jan 23:56

    Well I voted, and it's now at 251 votes. I have about 1550 blog posts to migrate for a client and their structure was rootdomain.com/title-of-post and now I need them all to be rootdomain.com/blog/title-of-post. Great...

  • Tucker Lemos commented
    December 14, 2023 21:19

    would be great and save a lot of hours

  • Ievgenii Kobzar commented
    October 21, 2023 04:29

    It's funny!!!

    Since 2017 (6 years) users have been asking to add the ability to mass import a list of redirects and WF is not itching.

    I don't know whether to cry or laugh. We plan to migrate 30 sites to WF and each site has up to 1000 pages. I can already imagine this process of adding redirects by 1 piece.

    It's sad...

  • Pim Veger commented
    October 09, 2023 22:35

    Help! Webflow updated to a new Interface and now Finsweet's option AND the option below with the script in the console in Chrome are no longer working... Does anyone have another way to bulk import? Please help!

  • Chris commented
    March 20, 2023 09:51

    It's not just about mass import - you might need to manage them later as well. The best thing would be a simple plain text field to where you could comment out redirects as well.

    Inside that field you simply copy paste all your urls in a certain (CSV?) Format - done :)

    /old,/new
    #/old2,/new2

  • Joe Kneale commented
    November 28, 2022 19:10

    None of the code snippets (that would be pasted into console) work - do what Michael recommends below to import/export, use Finsweet - it's f'in sweet!

  • Michael Wells commented
    October 31, 2022 20:52

    For CSV imports, use Finsweet's free Chrome extension.

    You get a nice import button on your redirects page.

    https://chrome.google.com/webstore/detail/finsweet-extension-for-we/mjfibgdpclkaemogkfadpbdfoinnejep

    For CSV exports, you can use my script here-

    https://www.sygnal.com/blog/export-301-redirects-as-csv

  • Dave Radparvar commented
    September 28, 2022 09:38

    Still waiting for this feature, and along the same lines ability to bulk export as well!

  • Nozzle Ai commented
    August 31, 2022 09:24

    Hey everyone,

    The original script is no longer working but I've updated it so that it works in the publishing tab/current setup


    var hostingContainer = document.getElementsByClassName('redirects')[0];

    var hostingController = angular.element(hostingContainer);

    var scope = hostingController.scope();

    var redirects = [

    {redirectPath: '/old-path', redirectTarget: '/new-path'},

    ];

    redirects.forEach(function (rule) {

    scope.redirectPath = rule.redirectPath;

    scope.redirectTarget = rule.redirectTarget;

    scope.addRedirect();

    });


    Just some small tweaks but it worked well for me :)

  • Megan Tilton commented
    May 16, 2022 16:25

    Yes, please!

  • Graphite Marketing commented
    February 27, 2022 07:40

    Yes please!

  • Juraj Carnecky commented
    May 23, 2021 14:48

    Yes please :)

  • Abby Cameron commented
    April 30, 2021 13:57

    Yes please! Would love the ability to import all redirects!

  • Max Shepley commented
    February 08, 2021 15:39

    I have created a short tutorial showing how you can use Janne's hack AND Parabola to bring together your URL links and follow the var redirects structure. Hopefully some find it helpful!

    https://www.sunrise.design/resources/bulk-import-301s

  • Max Shepley commented
    January 03, 2021 17:16

    I've made a video to build on the use of the script posted below. The script is amazing but isn't too helpful if you have 1000+ items and don't want to manually enter them into the script. Using Parabola's free tier, you can do this really quickly! Check it out: https://youtu.be/fhHLOyVrwkk

        var hostingContainer = document.getElementsByClassName('hosting-tab')[0];
    var hostingController = angular.element(hostingContainer);
    var scope = hostingController.scope();

    var redirects = [
    {source: '/old1', target: '/new1'},
    {source: '/old2', target: '/new2'},
    {source: '/old3', target: '/new3'},
    {source: '/old4', target: '/new4'},
    ];

    redirects.forEach(function (rule) {
    scope.redirectPath = rule.source;
    scope.redirectTarget = rule.target;
    scope.addRedirect();
    });
  • CareValue commented
    October 16, 2020 21:04

    Janne's hack worked!!!! I put 800 redirects into an excel sheet, concatenated the data together to follow the var redirects structure, and then copy and pasted into the google dev console. No need for a timeout, this hack is truly awesome. Thank you Janne!!!!!

    "This hack works at least with few redirects in the list. If more, maybe some sort of a timeout between addRedirect calls is in place...

    So you run this code in Google Chrome developer console as logged in user in Webflow on the Hosting tab in admin section pages. Just copy/paste the code to the console. Before that prepare the redirects-list with your own redirect rules.

        var hostingContainer = document.getElementsByClassName('hosting-tab')[0];
    var hostingController = angular.element(hostingContainer);
    var scope = hostingController.scope();

    var redirects = [
    {source: '/old1', target: '/new1'},
    {source: '/old2', target: '/new2'},
    {source: '/old3', target: '/new3'},
    {source: '/old4', target: '/new4'},
    ];

    redirects.forEach(function (rule) {
    scope.redirectPath = rule.source;
    scope.redirectTarget = rule.target;
    scope.addRedirect();
    });
  • James Seigel commented
    September 16, 2020 18:15

    Please!

  • Gustavo Alonge commented
    September 09, 2020 11:46

    Yes! Please!

  • Load older comments
  • +165