I am able to get redirected url using below curl command.
curl -Lks -o /dev/null -w "%{url_effective}" https://www.testpp.com
But I have a case where page loads with 200 status, but after 2 or 3 seconds, page gets redirected. Curl is giving me a response of 200 for the original url, but there is a 301 redirect which happens after the few seconds wait.
Is there a way i can get curl to trace out the final redirect?
No, the only way the page could redirect after x seconds is using JavaScript. Curl can only follow http redirects.