3

I'm taking care of a website which has multiple images coming from exterior links.

The thing is, those links are outgoing ones, and I want to avoid that as much as possible.

I tough of one solution which was to add rel="nofollow"to my links, but the thing is W3C is explicit about it: this is not allowed.

So my first question is: how would Google react to this?

The second thought I asked myself: could I tell Google via robots.txt not to crawl further? If yes, how am I supposed to do it?

I've read that regex is not allowed in robots.txt and I can't use something like Disallow: /*.jpg$ since I need some of my images to be crawled.

Edit:

I just thought of this:

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

Since all of our personal images are located in a specific folder. Would it work?

4

You are right, rel=nofollow is only for links. <img> tag can't have rel=nofollow attribute.

What do you mean by

disallow google to crawl out of my website through images?

Google bot doesn't crawl out when it encounters an external image. It just gives a positive (or sometimes negative) recognition to it and may index it - Google can't crawl an image. You website will be crawled as it is with or without external image links.

What rel=nofollow tells (in case of external link) google is that you are not positively recommending the website and merely providing a link. Even having external links without nofollow doesn't affect crawling of your website.

I am not sure if there is corresponding attribute similar to nofollow for images and it is rightly so because images can only be indexed and not crawled/followed. Whether to allow indexing of image or not is in the hands of the owner of the image (which is the external website) which can allow/disallow indexing of images through robots.txt but it isn't your decision.

User-agent: Googlebot-Image
Disallow: / 
| improve this answer | |
  • Im not that good in SEO but we are working with an agency that told me to "change the link on images outgoing to nofollow". So this is nonsense ? Does the solution I've put in my edit could be good ? – Baldráni May 20 '16 at 10:17
  • 1
    Yes, recommendation from your seo agency is nonsense as you can't nofollow an image. Since image is external, your robots.txt edit in not good. You can only control files on your website and not on some other website. – Aakash May 20 '16 at 10:23
  • "Since image is external, your robots.txt edit in not good" do you mean by that that the robots.txt while not react as I wish since the image is external. So it can't be targeted by the robot ? – Baldráni May 20 '16 at 10:34
  • 1
    Yes. You can't tell google to not index someone's else image through robots.txt. You can only put rules for the content which is hosted on your site. – Aakash May 20 '16 at 10:49
  • "change the link on images outgoing to nofollow" - are your images wrapped in anchors (a common WordPress thing)? – MrWhite May 20 '16 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.