I have a webpage with campaigns that are only valid for a specific period of time. My problem is that when a campaign is active, the homepage redirects to the campaign page and therefore the Google search result for the website shows the information from the campaign page.
At the moment I am doing the redirect only when there is no
referer. This way once the user clicks the logo of the webpage they see the normal home page and not the campaign anymore.
The other problem is that Google bots do not include
referer, so whey will always land on the campaign page when one is active.
I would like to tell the bots to skip the campaign and just index the home, but I think they cannot see the home page because of the redirect that I am doing.
Maybe I should use a different logic for the landing (campaign) pages? I thought about the following: having
domain.com would redirect to the campaign when one is active, but
domain.com/home would always just open home. Then I can set
domain.com/campaigns/1 with canonical to
domain.com. Would this be better?
To put it simple I need a way to tell Google to index my home page no matter if I have active campaigns or not and just skip the campaign pages.