Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including redirect-test with all npm packages installed. Try it out:

var redirectTest = require("redirect-test")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

redirect-test v1.1.2

Test your web server redirects for the correct status code.


NPM version Build Status Code Climate Test Coverage Issue Count Dependency Status

Test your redirects and get an easily readable and parsable csv file back. Testing a lot of redirects is hard and this cli aims to make it easier and less time consuming.



$ yarn global add redirect-test


$ npm i -g redirect-test


redirect-test <file> <url> [options]

Required fields

file: A csv file in the following format: old-URI,new-URI eg. /about-bob,/about/bob

url: The URL must be the final URL for the site. If it is not the redirect will get caught to early by conditionals such as non-www -> www and http -> https. Since this tool is not meant to test those types of redirects you will want to use the proper FQDN. eg.


-c, --csv: This will allow you to output to a custom csv file name and path. Default: ./results.csv

-q, --quiet: This will limit the console output to only print the csv file path.

-n, --number: The number of concurrent requests to make to the testing URL at a time. Default: 5





yarn test

If you want to dev locally and run tests on file changes you can run the following.

yarn test-local

NOTE: I politely ask that all pull requests have proper tests otherwise you will be asked to add them.


MIT © 2017 Charlie Pitkin



RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free