how to get redirect addresses

When trying to access a website from a browser, after I type the generic URL, am redirected to a more complex (different) URL.

How can I get the **redirected URL ** programmatically?

In my current program am using JS; **axios **and cheerio, but I get no response, since it doesn’t reach the first URL

P.S. I could also split it into two step project if necessary

TIA

A way to get the re-directed web address.

I have tried:

  1. Inter the URL in the forms, input=”text”
  2. Hit the Open button
  3. it opens the redirected URL in a new tab
  • BUT When I go back to the original tab, I see the alert windows “This page says. About:blank”…… can not get the re-directed URL