Is it possible to create a redirect with a X-Robots Tag: Nofollow?

Thanks!

Florian

Comments

dave reid’s picture

Status: Active » Fixed

Not currently. Since most times redirects are kept in-site, I don't think it would be good to add this to the module. Although I am probably going to be adding a hook_path_redirect() that gets invoked before a redirection happens, so you could add a small custom module to run:

function mymodule_path_redirect($redirect) {
  drupal_set_header('X-Robots-Tag: Nofollow');
}

I'm not sure on the name of the hook yet however.

wflorian’s picture

I am with you - I don't think a "Nofollow" option is necessary for all redirects, but for some redirect an available option to say that this redirect should be nofollow would certainly be helpful for a lot of users I think.

Thanks for the code, but unfortunatly I am a PHP newbie... where should I add the code?

Thanks a lot!

Florian

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.