I'm getting dozens of unwanted indexed pages in Wordpress that are actually media files URLs like this one: /wp-content/uploads/2024/11/Ellipse-78
I added a rule in my robots.txt, but I'm not sure it's okay because I do want crawlers to track my favicon.
Disallow: /wp-content/uploads/
What should I do? Thank you all
Indexing means you can find your favicon when searching using Google image. I guess what you want is having your favicon alongside your website name in search results.
Just having the correct HTML pointing to the favicon is fine:
<link rel="icon" href="favicon.ico" type="image/x-icon" />
Or you could have the default favicon.ico
in your root path. So even if you disallow /wp-content/uploads/
your favicon should appear in Google results.