Skip to content
Task 3

Task Details

Add a temporary in-app redirect to your project by redirecting /hello-vercel to https://vercel.com

Proposed Solution

Manually add /hello-vercel to the /hello-vercel in current website's URL,
or click on this link /hello-vercel

Since there are various ways to add temporary redirect in Next.js, I will use the following solution i.e. to add redirects block in next.config.js

// next.config.js
// ...
async redirects() {
    return [
        {
            source: '/hello-vercel',
            destination: 'https://vercel.com/',
            permanent: false, // for Temporary Redirect
        },
    ]
},
// ...
 
Last updated on August 5, 2022