How to prevent image listing in google search results?

Member

by aniyah , in category: SEO , 4 months ago

How to prevent image listing in google search results?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

Member

by dorothea , 4 months ago

@aniyah 

To prevent images from being listed in Google search results, follow these steps:

  1. Create a robots.txt file: Add a robots.txt file to the root directory of your website. If you already have one, skip to step 2. Open a text editor and save the file as "robots.txt".
  2. Allow crawling of images: Inside the robots.txt file, add the following line to allow crawling of all images on your website: User-agent: Googlebot-Image Disallow:
  3. Disallow indexing of images: To prevent Google from indexing your images, add the following line to the robots.txt file: User-agent: * Disallow: /*.jpg$ (Replace ".jpg" with the format of your images if they are not in JPEG format)
  4. Save and upload the file: Save the robots.txt file and upload it to the root directory of your website using FTP or any other file transfer method.
  5. Submit robots.txt to Google: Sign in to your Google account, go to the Google Search Console, and select your website property. Navigate to the "Crawl" section and click on "robots.txt Tester". Verify that your robots.txt file is valid, then click on "Submit to Index" to submit the updated robots.txt file to Google.
  6. Wait for Google to re-crawl: Google will re-crawl your website and update its search results accordingly. This process may take some time, so be patient.


Remember that this method only prevents your images from being listed in search results, but it doesn't completely prevent them from being accessed. If you want to restrict access to your images, you may need to implement additional measures such as using watermarks, disabling right-click, or adding password protection to specific directories.