Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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)?

share|improve this question
1  
Get entire rel="nofollow" in-depth explanation through video and updates article for rel="nofollow" google.com/support/webmasters/bin/answer.py?answer=96569 –  eThan Hunt Aug 17 '11 at 9:50
add comment

migrated from stackoverflow.com Aug 16 '11 at 20:48

This question came from our site for professional and enthusiast programmers.

5 Answers

up vote 12 down vote accepted

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.

share|improve this answer
    
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 Aug 16 '11 at 19:53
1  
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. –  Mark Cidade Aug 16 '11 at 19:57
    
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. –  DisgruntledGoat Nov 1 '12 at 12:16
add comment

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.

http://en.wikipedia.org/wiki/Nofollow

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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"/>.

share|improve this answer
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' Jan 24 '12 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" :( –  Sims Siniron Jan 24 '12 at 7:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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