php header: how to include nofollow in a location command

225 views Asked by At

I am using: header("Location: https://www.link.com"); but I want to be able to specify a no-follow in it. In another post someone explained to use header("X-Robots-Tag: noindex, nofollow", true);. But how do I combine them? I tried header("X-Robots-Tag: noindex, nofollow; Location: https://www.link.com"), true); but it did not work. Does anyone know the correct syntax? Thanks

1

There are 1 answers

0
Robson On

You call it multiple times:

header("X-Robots-Tag: noindex, nofollow");
header("Location: https://www.example.com");