I built a site with Angular 10. When the home page is visited it reroutes to this /welcome
.
However There's no link to that from anywhere within the app, so I don't think Google has any way of indexing that page.
What would be the best way of telling Google to index the page. From my research it seems I could do something like this:
<body>
<a class="hidden" href="/welcome" title="Welcome to example.com">Welcome to Example!</a>
<app-root></app-root>
</body>
What is the max number of links that this would work with and any other approaches?
/welcome
before any content is shown." When Googlebot crawls your home page, I don't see any reason to think it wouldn't see this URL change because it executes JavaScript. Why are you thinking that won't happen? A actual HTTP redirect would be safer for SEO, but as far as I know Google now follows JavaScript redirects. – Stephen Ostermiller♦ Sep 27 '20 at 11:34