Mobile app version of vmapp.org
Login or Join
Alves908

: 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

@Alves908

Posted in: #301Redirect #GoogleIndex #GoogleSearch #Redirects

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

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Alves908

2 Comments

Sorted by latest first Latest Oldest Best

 

@Shakeerah822

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.

10% popularity Vote Up Vote Down


 

@Heady270

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>

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme