How to redirect to an external URL in Next.js

added by JavaScript Kicks
7/13/2021 2:01:36 PM

3168 Views

In this tutorial, we are going to learn about how to redirect a user to an external URL in Next.js. Redirects allow you to redirect an incoming request from the user (/about) to a different destination ( https://google.com/about/). We can redirect to an external URL in Next.js by adding the following config to our next.config.js file.


0 comments