Does it make sense to have a rel="nofollow" attribute in img tag?

Do search engines' crawlers use this attribute in some way for calculating PageRank score?

What is the practical sense for using it (if any)?


5 Answers 5


The rel attribute is only for a and link elements. The nofollow value is to keep a web crawler from following that link (which might have affected the linked page's ranking based on your own). It keeps spammers commenting on blog posts from gaining any page ranking from linking from the blog (or discussion forum, etc.). It doesn't make sense for img elements and furthermore an img with a rel attribute is invalid, which may lower your relevancy score by a search engine.

  • You are sooo right! :D When I tried to validate an HTML code snippet with the W3C validator it says: there is no attribute "rel": You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. Can you pointing me to the W3C official reference saying that? Thanks.
    – diosney
    Commented Aug 16, 2011 at 19:53
  • 2
    The rel attribute is mentioned in w3.org/TR/html4/struct/links.html#h-12.1.2. The list of attributes that are valid for an img element are at w3.org/TR/html40/struct/objects.html#h-13.2. Commented Aug 16, 2011 at 19:57
  • 3
    Actually it does make sense for images - if you allow images to be posted on your site (e.g. a forum) you may want to let search engines know that you are not responsible for those images. In the same way links increase PageRank, embedding images can also increase their ranking in image search. Commented Nov 1, 2012 at 12:16

nofollow is a value that can be assigned to the rel attribute of an HTML a element to instruct some search engines that a hyperlink should not influence the link target's ranking in the search engine's index. It is intended to reduce the effectiveness of certain types of search engine spam, thereby improving the quality of search engine results and preventing spamdexing from occurring.



You should use rel="nofollow" on links that should not be rated for link popularity. You want this to be true for links that are not under your control (i.e. forum posts).

It does not matter if it is a text or img link. But in both cases only valid for the surrounding anchor tag.

Best example may be stackoverflow.com itself here: have a look at these Wikipedia links in your answers here. StackOverflow uses rel="nofollow" for it, because they cannot guarantee link quality for user generated content.

And even more important: it reduces spam-posts, because these links do not "count". So it does not make sense to spam for pushing link popularity.


If you use rel="nofollow" attribute in img tag than you will miss the img alt tag from the GSEPR. nofollow is better for stop spamming from the comments or other links which are not related with <a> tag which may decrease your PageRank. So better is using a code for your image without rel="nofollow" like this: <img src="" alt="" class="alignleft"/>.

  • 1
    (What's a GSEPR?) Can you provide an actual citation for what you're saying here? Given nofollow isn't even valid on img, it's more likely to simply be ignored, not cancel out the alt value(huh?)
    – Su'
    Commented Jan 24, 2012 at 7:21
  • i use {GSEPR} instead of Google Search Engine Page Result. ya, you are right that, nofollow isn't allow in img tag. i just tried to indicate that alt img tag are counted by googlebot, wheather a link tag with nofollow is ignored by it. So why someone won't use alt img tag to get better position in Google search ingine image result? basically i mistakenly write "img tag" instead of "a tag" :( Commented Jan 24, 2012 at 7:31

Yes. In theory, if you use rel="nofollow", then web crawlers will not crawl further on those links and will not consider it as a outlink from your webpage.

For example, if you have people posting comments, you would usually not want the links posted by someone else in a comment to be considered as a outlink from your website.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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