开发者

How to tell search engines NOT to look at this specific link?

Suppose I have a link in the page <a href="/mymessages">My Messages</a>, which on click will display an alert message "You must login to access my messages".

May be it's better to just not display this link when user is not logged in, but I want "My Messages" to be visible even if user is not logged in.

I think this link is user-fr开发者_运维知识库iendly, but for search engines they will get redirected to login page, which I think is.. bad for SEO? or is it fine?

I thought of keeping My Messages displayed as normal text (not as a link), then wrap it with a link tag by using javascript/jquery, is this solution good or bad? other ideas please? Thank you.


Try to create a robots.txt file and write:

User-agent: *
Disallow: /mymessages

This will keep SEO bots out of that folder


Use a robots.txt file to tell search engines which pages they should not index.

Using nofollow to block access to a page is erroneous - this is not what nofollow is for. This attribute was designed to allow to you place a link in page without conferring any weight or endorsement of the link. In other words, it's not a link that search engines should regard as significant for page-ranking algorithms. It does not mean "do not index this page" - just "don't follow this particular link to that page"

Here's what Google have to say about nofollow

...However, the target pages may still appear in our index if other sites link to them without using nofollow or if the URLs are submitted to Google in a Sitemap. Also, it's important to note that other search engines may handle nofollow in slightly different ways.


One way of keeping the URL from affecting your rank is setting the rel attribute of your link:

<a href="/mymessages" rel="nofollow">My Messages</a>

Another option is robots.txt, that way you can disallow the bots from the URL entirely.


You might want to use robots.txt to exclude /mymessages. This will also prevent engines which have already visited /mymessages from visiting it again.

Alternatively, add the following to the top of the /mymessages script:

<meta name="robots" content="noindex" />


If you want to tell search engines, not to follow a particular link , then use rel="nofollow". It is a way to tell search engines and bots that don't follow this link. Now,google will not crawl that link and does not transfer PageRank or anchor text across this link.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜