Tuesday, January 29, 2013

Tự động đặt nofolow cho liên kết ngoài - Blogspot


Tự động đặt nofolow cho liên kết ngoài - Blogspot

Tự động đặt nofolow cho liên kết ngoài

Nofollow là một yếu tố rất quan trọng trong SEO mà bất kỳ một SEOER nào cũng phải biết.
Để tự động đặt nofolow cho liên kết ngoài bạn có thể thực hiện:

B1. Bạn vào Mẫu -> Chỉnh sửa HTML ->Chọn Mở rộng Mẫu Tiện ích

B2 : Thêm đoạn code vào trước thẻ </body>

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'/>
//PART 2
<script type='text/javascript'>
//<![CDATA[
jQuery('a').each(function() {
var href = jQuery(this).attr('href');
if (typeof href != 'undefined' && href != "" && (href.indexOf('http://') != -1 ||
href.indexOf('https://') != -1) && href.indexOf([removed].hostname) == -1) {
jQuery(this).attr("rel", "nofollow");
}
});
//]]>
</script>

No comments:

Post a Comment