I am working with a client that wants an automatic redirect to a special "intro" page for first-time visitors to his site. We are using a website builder platform that does not allow any access to the server, so we can't do any server-side redirects - it's all client, so we're using javascript and cookies to detect first-time visitors and then jumping to the intro page (example.com/intro) by setting window.location. There is a big "skip intro" link on the intro page to jump back to the home page.

Google is showing the intro page in search results, which makes sense, it's coming in with cookies enabled and then we jump to the intro page so that's what it's seeing. We do have a canonical link on the home page, but not on the intro page.

So this is all kinds of bad and Google is probably thinking that we're doing a sneaky redirect, which makes sense - someone searching based on index keywords on the home page gets redirected to this intro page... not a good search experience, I get it.

Changing to a huge page-blocking interstitial instead of loading a separate page is not good, obviously.

So... what to do. I'm thinking we give up on the magical redirection and put a link on the home page to the intro... if it's a first-time visitor, highlight the link without a content-obscuring popup that Google won't like... trying to make the client happy but getting penalized by Google is good justification for dropping the javascript page redirect.

Q: To confirm, is there a way to redirect (via javascript only) to an "intro" style page without getting dinged by Google and other search sites? How do we do this in a way that makes sense?

  • 1
    Google executes JavaScript nowadays, a conditional redirect would need to be more sophisticated than simply using a simple JavaScript redirect. If you decide to do this, you'll probably go unnoticed for a while until they detect cloaking/sneaky redirects. // When you get caught you might get a manual action if Google considers it to be needed. If not needed, you will only see a drop in ranking and traffic of some size. // The worst a manual action will do for the site is demoting it, it will probably still remain indexed. An automatic action might do something interesting.
    – Oskar Skog
    Jul 21, 2017 at 20:26

1 Answer 1


Q: To confirm, is there a way to redirect (via JavaScript only) to an "intro" style page without getting dinged by Google and other search sites?

A redirect via JavaScript for guests with slower devices and/or high connectivity problems is not so good because some HTML code must load first before the beginnings of JavaScript can even begin. This means more unnecessary bytes to download.

Another thing with a redirect is that it causes users to make two web page requests instead of one. One request for the redirect screen and one request for the web page itself.

How do we do this in a way that makes sense?

Since you can deal with cookies, one idea is to implement a tracking system so that you can distinguish new guests from returning guests. New guests won't have the special cookie that you implement set yet on their systems and they will then be taken to the intro page. returning guests will have the cookie already set so no loading of the intro page is necessary.

But there is something better than all of this

Make the world happy and give everyone options rather than force people to a certain page based on their experience with the site.

Use a small portion of the home page at the top which allows all users regardless of experience to take a tour of the website with one simple click, and of course, add the usual website content below the mini tour advertisement. That way, all search engines can easily find your content and index it.

If you want to tailor it to new users only, then only show the small portion if the users cookie (described earlier) has not been set then have a close button to set the cookie and hide the tour option. Think of it like some websites complying to the new cookie law by using a portion of the screen telling users that cookies are used for site operation etc.

  • Thank you, have definitely been thinking along the same lines. Does Google in fact penalize the site or consider it a "sneaky redirect" if first-time visitors (determined by simple cookie) are redirected via javascript to another page? Jul 9, 2017 at 22:32
  • 1
    I'd say a bit of both, but more so penalize because of the fact that it takes longer to load HTML up to the point in which the javascript loads and that creates a slower user experience which google won't like. Jul 11, 2017 at 3:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.