Welcome back to my website, this time I will give short tips on how to hide the images in our article so they don't appear in Google image searches like the image below using the robots.txt file.
What is robots.txt? robots.txt is a file that contains rules for search engine "crawlers" how to interact with articles or other elements on our website such as images, audio, videos, etc. What we publish on the internet, in other words, what will appear from the data retrieved by "crawlers" on each search engine, especially Google, we can control via robots.txt.
Brief
Maybe this method is not very useful what else for us bloggers who want the articles we make can be read by many people, making the images in the articles seen by many people can add clicks or impressions to our website, but there are also from those of you who may not want the images that we have to be used by others through ways such as screenshots etc. That's why I made this tutorial.
This time I will give a tutorial on how to block image elements that will appear on google search images (like the illustration above).
Alright, let's start how to block images on our website, this tutorial will be specifically for blogger users, for those of you who use other hosting that requires robots.txt to be downloaded manually, you can see the link below.
how to update robotstxt in blogger
We start from blogger then we look for settings (Box1) then look for the indexing and Crawlers (Box2) section then we activate custom robots.txt(Box3) as shown below.
Next, let's get the active robots.txt first by adding robots.txt(Box1) in our website url then we copy the existing text(code)(box2) as shown below
now we have the robots.txt code then let's go back to blogger and paste the existing text by clicking on custom robot.txt(Box1).
Until the display appears as above (box2)
Next let's add the code below to the first text we paste
- User-agent: Googlebot-Image
- Disallow: /
There will be some rules for using the above code to work that by adding the code in Disallow: / or the second line of the above code with the example below
1. make sure the User-agent is Googlebot-Image so that the image will not appear in google searches for the images category (Box1) see the image below, if you use Googlebot only as the User-agent the image will be removed from all types of searches that display images such as (box2) image below.
2. The second code above will immediately block all types of images recognized by google crawls such as BMP, GIF, JPEG, PNG, WebP, and SVG. More you can see the link below
#link google search images
3. If you want to separate one type of image from blocking, for example .gif you can add a sign ( * ) then an extension or image type ( .gif ) and end with a sign ( $ ).
Example: Disallow: /*.gif$.
4. Blocking certain images from the article page that we created by writing code like this first we add the url of the article where the link is without our domain (example article) then we add ( /image.extension)
Example: Disallow: /articleexample/name.jpg/
That way the image in the article with that name will be removed or not appear on google search images.
If you want to find another way to block elements in your blog from appearing on the Google search engine, you can read the article below about blocking one page using the search console.
Article will be uploaded
Alright, here's the tutorial and tips this time, thank you for visiting, see you in the next article, if you have any questions, please comment below, thank you.
0 Komentar