3

I am currently creating my website and I have a problem. During the first visit to the website, an animation is played, it is a sequence of images that follow each other in full screen that disappear one by one with javascript by adding display: none; to each image in the order with 1 second of delay. I don't think that Google will understand that it's an animation.

The code looks like this:

<div id="introDiv"> <!-- The div that contains images to hide -->
    <img src="img01.jpg" id="img01">
    <img src="img02.jpg" id="img02">
    <img src="img03.jpg" id="img03">
    <img src="img04.jpg" id="img04">
    <img src="img05.jpg" id="img05">
    <img src="img06.jpg" id="img06">
    <img src="img07.jpg" id="img07">
    <img src="img08.jpg" id="img08">
    <img src="img09.jpg" id="img09">
    <img src="img10.jpg" id="img10">
</div>

How can I tell Google that it should try to understand the page using this animation? I'd like Googlebot not to try to index the animation or information from the animation. I'm afraid for the SEO.

  • There's no way of hiding page elements without cloaking, of which is punishable by both Google and Bing. Google and Bing can render pages, just as they were real users. If Google can't render it, then likelihood neither can some of your visitors. Use Google Fetch tool – Simon Hayter Oct 22 '18 at 22:26
  • Also no need to use ID for inner components of a element, class or nth is more partical, furthermore, your missing alt tags. – Simon Hayter Oct 22 '18 at 22:30
2

There is no reason to believe that the series of images will hurt SEO, as it is a common practice to show and hide images for animations using JS/CSS on the web.

You are correct that Google will definitely not understand that it is an animation, so the Google Images bot might try to index each frame of the animation as an image in Google Image Search. However, it probably doesn't matter as much for SEO as you think.


That said, if you want to tell Google specifically not to index your images, add this to your /robots.txt file:

User-agent: Googlebot-Image
Disallow: /img*.jpg$

This will prevent any of the images from being indexed or shown in Google Image Search.

Source: Google - Prevent images on your page from appearing in search results

  • Just to add to this, you can specify a path in the Disallow directive to just the images directory that you don't want indexed, so other similarly named images in your website will still get indexed (so only the images in the animation directory won't get indexed). – dan Oct 23 '18 at 0:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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