when someone connects to my homepage I geolocate using their IP and redirect to the site with the right language (for example someone from Italy connects to example.com and I redirect them to example.com/it).
AFAIK the way to behave in these cases concerning SEO and search engines is to permanently redirect to avoid making the search engine think that the content is duplicated, but in this case the same URL can redirect to many other pages (example.com can redirect to example.com/it, example.com/en, example.com/br, example.com/ch and so on).
What should I do to keep all the link juice going to example.com and still keep the functionality with all the localization and ip geolocation going? Right now my response is a 302 Found and then 200 OK after the redirect, is this right?