skip to Main Content

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


  1. google at request headers (referer)
    check if the referer is one of searchEngine websites,
    if it’s make a redirect

    Login or Signup to reply.
  2. I think you could use a canonical tag in your index appointing to the landing page, something like this:

    <link rel="canonical" href="https://www.example.com/mylandingpage">
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search