Emergency Redirect

Learn how to implement an emergency redirect without re-deploying your site.
Last updated on November 21, 2024
Security

Scenario: During the release of a new feature to your production website, you identify a bug where users cannot log in. You cannot go back to a previous deployment and need some time to publish a fix. You can create a redirect to another URL where you can support your users in the meantime.

  1. Select your project from the Vercel dashboard and select the Firewall tab.
  2. From the top right corner of the Firewall page, click the Configure button and then + New Rule.
  3. For the Name, enter "Emergency redirect".
  4. In the Configure section, set up the following If configuration:
  • If Request Path Equals
  • Enter the relative path of the page where the problem is happening. For example /conference-login.
  1. In the Then section, select "Redirect" from the dropdown.
  2. In the to field, type the URL of the page you want to redirect to. If the page exists in the same project, you can use a relative URL. Your rule should look like this:
    Rule for redirecting users to a different page
    Rule for redirecting users to a different page
  3. Select Save Rule.
  4. Apply the changes:
    • When you make any change, you will see a Review Changes button appear or update on the top right with the number of changes requested
    • Select Review Changes and review the changes to be applied
    • Select Publish to apply the changes to your production deployment
  5. Test that the redirect is working by navigating to the request path where the problem is happening.