I recently developed and published my first large angular project (I am still relatively new to angular). For better SEO I decided to look into static prerendering using both Scully and Angular Universal, both have one critical issue, so google search console & Bing webmaster refuses to rank most of my routes because of Redirect issues (301 redirect).
So what happens is that, after the page is prerendered the urls is adding an extra slash "/" at the end, then after few seconds angular starts and makes a redirected javascript to the correct page.
the prerender page will make the url like
https://www.mywebsite.com/page1/
then after some time redirects to
https://www.mywebsite.com/page1
the first url is the one prerendered
google search console & Bing webmaster consider both of these routes as redirects and are therefore not indexed, when the one without "/" is visited, slash is first added and then removed (therefore a redirect ) and similarly when the one with "/" is visited it is redirected to remove the slash. Prerendering is supposed to help in SEO but it is instead hurting SEO, I've checked and these are indeed 301 redirects, Am I doing something wrong here? I searched about this issue all around the internet but found no solution. Can someone please help me with this.
As you can see in the screenshot most of my pages are not indexed with the reason given as pages with redirect or redirect error