I have a simple website with a single page containing a canvas element that is rendering a video game.

I have a script on this page that hides the canvas element and displays a special message when the site is rendered in a mobile browser.

Will search engines penalize my website because it is rendering different content for different kinds of devices?

  • 2
    Google has two crawlers, one for desktop and the other for mobile devices. Content that is visible for desktop will index for those devices, and vice versa. It's completely normal to use display: none and other friendly methods to hide content depending on the device. Commented Sep 1, 2016 at 0:14
  • 1
    make clear, that you hide things not based on defined user agents - this would be risky
    – Evgeniy
    Commented Sep 1, 2016 at 14:46

1 Answer 1


I think it will be okay, but to be sure give your users a link to the "desktop" version somewhere so nothing is cloaked.

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.