Link exchange and X-Robots-Tag

or how not to give a link in exchange of a link.

In the HTTP header, we can set the X-Robots-Tag :

header("X-Robots-Tag: noindex", true);

will prevent search engines from showing the file.

However, you could prevent search engines from following the links on those pages, by doing the following:

 header("X-Robots-Tag: nofollow", true); 

The links on the page will appear as followed when they are not followed.