Avatars Being Indexed By Google

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Suggested Hosts
Post Reply
User avatar
ChinaGal
Registered User
Posts: 162
Joined: Fri Jan 24, 2020 10:02 am

Avatars Being Indexed By Google

Post by ChinaGal »

I saw that Google has indexed many of our site member's avatars in Google images, which isn't something that we really want. Is there a possible way to get Google to remove them now?

We also created a robots.txt file to try and prevent search engines from indexing images from our site in the future. We didn't have a robots.txt file before. We didn't really need it we felt since we are happy to let all bots crawl our site and didn't have any restrictions.

So following below is what we have in the robots.txt file now that we created one. I hope this will not hurt our search engine rankings in any way as a result of these settings we put in place to block image indexing?

Code: Select all

User-agent: *
Disallow: /*.gif$
Disallow: /*.jpg$
Disallow: /*.png$
Thanks

User avatar
Elias
Registered User
Posts: 4749
Joined: Sat Feb 25, 2006 4:31 pm
Location: In the Water!
Name: Elias

Re: Avatars Being Indexed By Google

Post by Elias »

"Mystery creates wonder, and wonder is the basis of man's desire to understand." - Neil Armstrong
|Installing Extensions|Writing Extensions|Extension Validation Policy|

User avatar
ChinaGal
Registered User
Posts: 162
Joined: Fri Jan 24, 2020 10:02 am

Re: Avatars Being Indexed By Google

Post by ChinaGal »

Great, thank you!

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 3512
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Avatars Being Indexed By Google

Post by thecoalman »

When using robots.txt try and be specific.


This matches any request starting with file.php which would include any file uploaded to the forum.

Code: Select all

User-agent: *
Disallow: /phpbb_root/download/file.php


This will only match requests starting with file.php?avatar

Code: Select all

User-agent: *
Disallow: /phpbb_root/download/file.php?avatar


You do not need to use wildcard to match ending strings, e.g this would be unnecessary:

Code: Select all

User-agent: *
Disallow: /phpbb_root/download/file.php?avatar*


The $ is only necessary to indicate the end of string. Suppose you wanted to block forum with ID 1

Code: Select all

User-agent: *
Disallow: /phpbb_root/viewforum.php?f=1$
Without the $ you would match any forum ID starting with 1 (e.g. f=11, f=12, f=112 etc). If you get a search console account with Google they have robots.txt tester so you can check different URL's.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison

User avatar
ChinaGal
Registered User
Posts: 162
Joined: Fri Jan 24, 2020 10:02 am

Re: Avatars Being Indexed By Google

Post by ChinaGal »

Thank you for that. On the link provided above it said to use the following. It seems like the simplest and easiest and it is what Google recommends to use if you want them to remove all images from their indexing:

Code: Select all

User-agent: Googlebot-Image
Disallow: / 

Post Reply

Return to “phpBB Discussion”