: How to prevent Google from indexing redirects to external URLs as part of the originating domain? We have links to external URLs implemented with HTTP 301 redirects for the purpose of counting
We have links to external URLs implemented with HTTP 301 redirects for the purpose of counting clicks.
Searching our site in Google using the site: modifier results in the redirecting URLs returned with title and snippet from the external content.
Why is this? How can this be prevented? Could the reason be the use of a permanent redirect in place of a temporary one?
See it by searching for site:weblabor.hu inurl:/blogmarkok/latogatas lang:en
More posts by @Alves908
2 Comments
Sorted by latest first Latest Oldest Best
The reason is in the way you've added the link.
The attribute rel="nofollow" is required on every external link you put in your page, robots wouldn't index a link with rel="nofollow" attribute in the anchor tag.
Googlebot is finding your redirect links but it probably can't crawl them because you have disallowed them in robots.txt. It then thinks that your site has additional content and it "indexes" it with the link text.
You could get around this by making your links point exteranally, but use JavaScript to write in the tracking. That way Googlebot can see where they go, and users still get tracked.
<a href="http://example.com/"
onmousedown="if(this.href.indexOf("http")==0)this.href='/track?url='+encodeURIComponent(this.href)">
Link to external site</a>
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.