mihomes - 9:39 pm on Sep 6, 2012 (gmt 0)
Looking to use a php redirect script for my site and I do not want the page to be indexed, followed, archived, etc.
I have disallowed the /goto.php page in my robots.txt, however, Google also states if other sites link to this page it could still be picked up.
To entirely prevent a page's contents from being listed in the Google web index even if other sites link to it, use a noindex meta tag or x-robots-tag. As long as Googlebot fetches the page, it will see the noindex meta tag and prevent that page from showing up in the web index. The x-robots-tag HTTP header is particularly useful if you wish to limit indexing of non-HTML files like graphics or other kinds of documents.
So, is my implementation of the x-robots-tag below correct and will this accomplish what I am looking for?
Use the following link format:
$p = $_GET['p'];
$link = "/widget1.htm";
$link = "/default.htm";
header("X-Robots-Tag: noindex, nofollow, noarchive", true);