How to redirect in nextjs?
Answered
Western Screech-Owl posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Western Screech-OwlOP
So i want to redirect my user to "/home" as soon as they visit my site but the redirect function is for async it seems. I get an error with this saying argument invalid
![Image](https://cdn.discordapp.com/attachments/1189638276785635428/1189638277184110692/Screenshot_18.png?ex=659ee3fb&is=658c6efb&hm=098b6a76d68b0e1a1cdd7881c50512cc2a85c7e4f6729ca82e37e565c0f856de&)
2 Replies
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
import { redirect } from 'next/navigation';
Answer
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Western Screech-OwlOP
thanks not sure why my import was like that