How to make free tier login url work with www. and without it


I am using the free tier at this moment. I am in production and I noticed that if user is accessing without www. the site it will cause an error. If user access the site and need to login using with www. it will work nicley. How can I sync everything to work with www. and without?

will not work-

will work -

If i push the user from: to it wont work.

the implementation is in nextjs.

im having issues with the baseurl