Got pictures you do not want indexed by search engines? These guides show you how!

 There are many ways to prevent search engine index images on your website. In this article, I will show you how to do it with the Apache server using the .htaccess file, with the robots.txt file, or with the NGINX server in the file config. I will walk you through every method to let you choose the right one for your website. These steps by step guides are available for someone such as web developers, website owners, or anyone who know well about this. And please back up your website or files before you make any changes.

Noindex images in search engines tips and tricks

Robots.txt

When you want to keep images from being indexed by search engines, there are a few things you can do. You can use a robots.txt file to tell search engine robots not to crawl certain image files. 

For example, if you have an image called "dog.jpg" and you don't want it to be indexed by search engines, you would add the following line of code to your robotstxt file: disallow: /dog.jpg 

This will tell the robots not to crawl any files located at "/dog.jpg".

Here is an example of code added to the robots.txt file:

User-agent: * Disallow: /dog.jpg

Here is an example of code to tell with Google bot does not index images from your sites:

User-agent: Googlebot-Image Disallow: /

Here is an example of code to tell with Google bot does not index all images from your sites:

User-agent: Googlebot-Image Disallow: /

Thank you for reading at www.howbeginners.com! This website is dedicated to providing beginner-friendly content that will help you learn new things and improve it. I hope you enjoy it!

Here is an example of code to tell with search engines does not index all images in the folder /images/ of your sites:

User-agent: * Disallow: /images/ Keep in mind that the folder where your images are located may not look like this.

Here is an example of code to tell with search engines bot does not index GIF images from your sites:

User-agent: * Disallow: /*.gif$

Here is an example of code to tell with search engines bot does not index PNG images from your sites:

User-agent: * Disallow: /*.png$

Here is an example of code to tell with a search engine does not index JPG images from your sites:

User-agent: * Disallow: /*.jpg$ 

Here is an example of code to tell with a search engine does not index PDF files from your sites:

User-agent: * Disallow: /*.pdf$ 
Welcome to www.howbeginners.com. Click to expand! Welcome to www.howbeginners.com, a website that provides helpful tips and advice for beginners in a variety of different fields! My goal is to provide easy-to-follow guides and tutorials that will help you get started with whatever you're interested in.! I hope you find this website helpful and informative, and I wish you the best of luck as you begin your journey!

How To Make WordPress All Images not index in Search Engines

Here is an example of code to tell with a search engine does not index WordPress's images from your sites:

User-agent: * Disallow: /wp-content/uploads/

.htaccess Apache server

Here is the way to set Header X-Robots-Tag noindex with the .htaccess Apache server. Header X-Robots-Tag is a way to tell the search engine not to index the specific images or files listed in the list below. This can be done by adding the header to the .htaccess file on an Apache server. The code is:

<FilesMatch "\.(bmp|gif|jpg|png|tif|svg|webp)$"> Header set X-Robots-Tag "noindex" </FilesMatch>   
This will tell the search engine not to index the images with these extensions bmp, gif, jpg, png,tif,svg,webp but to still follow any links on the page. 

This example of code will prevent search engines index all .PDF extensions

<Files ~ "\.pdf$"> Header set X-Robots-Tag "noindex, nofollow" </Files>

NGINX Server

This example of code will prevent search engines index all .PDF extensions with NGINX

location ~* \.pdf$ { add_header X-Robots-Tag "noindex, nofollow"; }

### This example of code will prevent search engines index images extensions png, jpeg, gif, tif, bmp, webp, pdf with NGINX

location ~* \.(png|jpe?g|gif|tif|bmp|webp|pdf)$ { add_header X-Robots-Tag "noindex"; }

Follow me

You can follow me here:
Twitter: @wwwhowbeginnerHashnode: Follow Here
Medium: @wwwhowbeginnerscom
Bloglovin: Read More Here

Subscribe RSS Feed

RSS Feeds are a great way to keep up with your favorite websites without having to visit them regularly. You can subscribe to RSS Feeds by using an RSS Reader application. An RSS Reader is a program that allows you to subscribe to RSS Feeds and view them in one place. There are many different RSS Reader applications available, both free and paid.

Once you have installed an RSS Reader application, you can subscribe to any number of RSS Feeds. Most RSS Reader applications will allow you to add a website's RSS Feed by simply copying and pasting the URL into the application. Once the Feed is added, you will be able to view the latest articles from that website right in your RSS Reader application.

RSS Feeds are a great way to keep up with your favorite websites without having to visit them regularly.

Here my blog RSS Feed: https://www.howbeginners.com/feed/

Add my RSSFeed link into your RSS Feed reader application in order to get update on new upcoming contents from my blog.

Thanks For Reading!

I just wanted to take a quick moment and say thank you for reading my website, www.HowBeginners.com. I created this site with the hope of helping beginners learn how to start doing things on their own, and I'm glad that it has been helpful to you.

If there is anything else that you would like me to cover on the site, or if you have any questions, please don't hesitate to let me know by leaving a comment below. I'll do my best to get back to you as soon as possible.

Once again, thank you for reading and I hope you continue to find the content on my site helpful.

See Also

Post a Comment