2

I have an asp:LinkButton that triggers a PostBack, pushes some stuff into the database, then does a Response.Redirect to send the user on to the next page.

For SEO purposes we don't want spiders to follow the link to the next page. Does Response.Redirect have some way to specify nofollow?

Kelsey
  • 47,246
  • 16
  • 124
  • 162
Jason
  • 1,766
  • 2
  • 14
  • 24

2 Answers2

2

The spiders did not "follow" the PostBack from that LinkButtons.

Why ? because they need to run javascript, then the javascript do something, and post back the page and all that follow by the spiders. They do not do that, they only follow clear links to other pages.

Aristos
  • 66,005
  • 16
  • 114
  • 150
  • Do you happen to have a source for this? I was looking earlier and didn't have any luck finding anything. – Jason Jan 31 '13 at 21:22
  • 1
    @Jason Almost all spiders did not even use/run javascript, so its impossible to run it and follow it. Its also difficult for a spider to actually emulate the full javascript run of any page and do action like the post back. They do see the Response.Redirect and follow it if you place it on the page, but they can not run commands like that (and they do not care to do it). – Aristos Jan 31 '13 at 21:24
1

Response.Redirect does not handle nofollow since that is happening server side.

To get a similar behavior as the no follow you have to insert a 'middle man' page that is a link with nofollow and contains information to tell the intermediate page which page to redirect to. This is a common practice used when trying to gather information on links to outside sites or intercepting links to add affiliate codes etc.

Eg of link to middle man page:

<a href="redirect.aspx?url=www.google.com" rel="nofollow">Your Link</a>

Then in your redirect page you just pick out the www.google.com from the query string and do any tracking or whatever you need and then a Response.Redirect to the url provided.

EDIT: I totally missed the fact that you are using a LinkButton. Aristos is correct in that spiders will not execute the javascript to do the PostBack.

http://www.keyrelevance.com/articles/search-engine-listings.htm

JavaScript is a wonderful technology, but it's invisible to all of the search engines. If you use JavaScript to control your site's navigation, spiders may have serious problems crawling your site.

But Google is constantly getting better at it so you never know:

http://www.youtube.com/watch?v=8yTn_HLDaJs&feature=player_embedded

There is no specific standard that says they couldn't do it in the future but it's not easy/likely. If you are really that worried about it, implement something similar to the solution I posted.

Kelsey
  • 47,246
  • 16
  • 124
  • 162