Next.js · Junior · Question 55 of 75
How does permanentRedirect() differ from redirect()?
- ✓Correct answer:
permanentRedirectreturns 308 (permanent),redirectreturns 307 (temporary) - 2
permanentRedirectworks only in the Pages Router - 3
redirectalso changes the URL in search engines forever
Explanation
Use a permanent redirect when a URL has moved for good (e.g. a renamed slug), so search engines transfer ranking to the new address.