The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Intermediate & Advanced SEO
    4. If Robots.txt have blocked an Image (Image URL) but the other page which can be indexed has this image, how is the image treated?

    If Robots.txt have blocked an Image (Image URL) but the other page which can be indexed has this image, how is the image treated?

    Intermediate & Advanced SEO
    4 3 1.4k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Malika1
      Malika1 last edited by

      Hi MOZers,

      This probably is a dumb question but I have a case where the robots.tags has an image url blocked but this image is used on a page (lets call it Page A) which can be indexed. If the image on Page A has an Alt tags, then how is this information digested by crawlers?

      A) would Google totally ignore the image and the ALT tags information? OR

      B) Google would consider the ALT tags information?

      I am asking this because all the images on the website are blocked by robots.txt at the moment but I would really like website crawlers to crawl the alt tags information. Chances are that I will ask the webmaster to allow indexing of images too but I would like to understand what's happening currently.

      Looking forward to all your responses 🙂

      Malika

      1 Reply Last reply Reply Quote 1
      • donford
        donford last edited by

        Hi Malika,

        Blocking image directories or images themselves in robots.txt only prevents the image from being added to "image" search results. You will still get the full benefit of the alt text on the page, the image just won't appear in the image results.

        How this actually works is the crawler will crawl the site and index all the text and weight (h1, h2, alt etc..) then when the crawler moves to add the image to the search cache it finds it can't access it due to robots.txt and simply ignores it and goes on.This leaves your original text as what is indexed as a search result, and nothing for image results.

        If you are using Apache you may want to not use robots.txt as the method of blocking images. I would recommend using the .htaccess file with a code like this...

        <filesmatch ".(bmp|gif|jpg|png|tif)$"="">Header set X-Robots-Tag "noindex"</filesmatch>

        This is a blanket declaration and would prevent indexing of any images with the noted extensions on your site. This is particularly useful if you have multiple image directories. Further more if there are a few images you want indexed you could pick a particular extension like .jpeg for example (note jpeg not jpg), then just convert those few images and know they will be indexed as they are not in the exclusion list.

        Another benefit of handling it this way is if you already have images that are indexed, using the noindex tag will get them out out of the image directory much faster than blocking them. The reason is you are giving Google a new directive which is "noindex", otherwise they will just treat them as inaccessible and move on, leaving any cached version to appear in the directory for some time.

        Hope that makes sense and helps,

        Don

        1 Reply Last reply Reply Quote 4
        • Malika1
          Malika1 last edited by

          Hi donford,

          Thanks for this detailed answer, really appreciate it! 🙂

          Malika

          1 Reply Last reply Reply Quote 0
          • alphonseha
            alphonseha last edited by

            May I ask why you/your webmaster would have noindexed your images in the first place?

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            • If I block a URL via the robots.txt - how long will it take for Google to stop indexing that URL?
              GastonRiera
              GastonRiera
              0
              3
              98

            • Robots.txt, Disallow & Indexed-Pages..
              thekiller99
              thekiller99
              0
              5
              341

            • Pages getting into Google Index, blocked by Robots.txt??
              Devanur-Rafi
              Devanur-Rafi
              0
              10
              673

            • Robots.txt Blocked Most Site URLs Because of Canonical
              0
              1
              117

            • Blocking out specific URLs with robots.txt
              Modi
              Modi
              0
              3
              133

            • Google showing high volume of URLs blocked by robots.txt in in index-should we be concerned?
              TakeshiYoung
              TakeshiYoung
              0
              4
              302

            • Can URLs blocked with robots.txt hurt your site?
              workzentre
              workzentre
              0
              4
              302

            • Block all but one URL in a directory using robots.txt?
              Cyrus-Shepard
              Cyrus-Shepard
              0
              3
              3.5k

            Get started with Moz Pro!

            Unlock the power of advanced SEO tools and data-driven insights.

            Start my free trial
            Products
            • Moz Pro
            • Moz Local
            • Moz API
            • Moz Data
            • STAT
            • Product Updates
            Moz Solutions
            • SMB Solutions
            • Agency Solutions
            • Enterprise Solutions
            • Digital Marketers
            Free SEO Tools
            • Domain Authority Checker
            • Link Explorer
            • Keyword Explorer
            • Competitive Research
            • Brand Authority Checker
            • Local Citation Checker
            • MozBar Extension
            • MozCast
            Resources
            • Blog
            • SEO Learning Center
            • Help Hub
            • Beginner's Guide to SEO
            • How-to Guides
            • Moz Academy
            • API Docs
            About Moz
            • About
            • Team
            • Careers
            • Contact
            Why Moz
            • Case Studies
            • Testimonials
            Get Involved
            • Become an Affiliate
            • MozCon
            • Webinars
            • Practical Marketer Series
            • MozPod
            Connect with us

            Contact the Help team

            Join our newsletter
            Moz logo
            © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
            • Accessibility
            • Terms of Use
            • Privacy