I have a nextjs webapp.
I want the main application to run on the index route: ...mydomain.com/
.
But I also want to have a landing page at route: ...mydomain.com/mylandingpage
.
The question I have is, how do I tell Bing, Google, DuckDuckGo etc, that the ‘page of interest’ is ... mydomain.com/mylandingpage
and not ... mydomain.com/
?
Can I use a robots.txt file, or is there some special way of linking the pages, or using 307 redirects?
2
Answers
google at request headers (referer)
check if the referer is one of searchEngine websites,
if it’s make a redirect
I think you could use a canonical tag in your index appointing to the landing page, something like this: