0

If a redirect happens with the following code:

<?php 
$delay = 5; //seconds 
sleep($delay); 
header('HTTP/1.1 301 Moved Permanently'); 
header("Location: http://www.example.com"); 
?>

is the link juice flow impacted?

Update:

The goal behind this is: a site will be moved to another domain. The time delay before the redirect should provide time for visitors to read a message about why and where they will be redirected to.

Unlike the above, which is a 301 redirect, a Meta refresh doesn't pass link juice, value, or equity.

  • 3
    If you add a echo before $delay that message will not be displayed, but Google will treat this like any other redirect. You can test this yourself by doing a curl www.example.com – Simon Hayter Dec 12 '17 at 17:01
  • 1
    Can we stop using the terms link juice? Can we use the term link value instead? I have personally tried to squeeze links and have yet to produce juice. (humor offered with friendship). Somehow, I hate the term juice. It frustrates me. Clearly a personal problem! Cheers!! – closetnoc Dec 12 '17 at 17:18
  • 3
    Adding a five second delay seems like a way to trigger Google's penalties against slow sites. – Stephen Ostermiller Dec 12 '17 at 19:18
  • 4
    "The time delay before redirect should get time for visitors to read a message" -- That won't work. If you block before writing the headers, you also won't be able to write the page with the message for those 5 seconds. In HTTP, the headers are always written before the page. You could use a meta refresh with a 5 second delay or you could use JavaScript to setLocation after a 5 second delay, but you cannot use a 301 permanent redirect with a delay. It just isn't possible to put a message in front of the user with a permanent redirect. – Stephen Ostermiller Dec 13 '17 at 10:10
  • 1
    @StephenOstermiller that makes sense. – Evgeniy Dec 13 '17 at 10:36
1

Although John Muller has confirmed that no PageRank(RIP) is lost, Moz has claimed that there is some studies that confirmed the contrary. Either way, in my opinion, it is safer to assume that some “link juice” is lost.

The delay won’t really matters because clients wait for the server response and then fetch response content. 301 will be the response, In which case “link flow” will not be disrupted. Technically in the SEO world this is not worth trying, even if you want to deceive Google.

If you want to do this to let users know in 5 seconds that you page has moved, use JavaScript to redirect. It is healthier.

After Question Clarification

If the content stays the same between the old and the new domain, I would recommend to leave the content up, take advantage of well supported cross-domain canocalisation and create a canonical tag making reference to the new domain. I would also create a Pop-Up window or a top sliding window message to display a notification text with a link to the new page/domain. Then, wait until Google Index the new domain or De-Index the old domain entirely, and implement the 301.

  • did you ever tried to convince a client, that javascript redirect is healthier than a 301? The questrion is not, whether 301 passes linkjuice or not, but rather would the delay disturb the linkjuice flow – Evgeniy Dec 13 '17 at 10:34
  • @Evgeniy sorry if I sounded somehow arrogant. We don't really know too much details as to why you want to implement the delay in the response. With the given information I can only presume you need to show the user a message before sending the HTTP response. Within the context of what it has been given I can say that a JS redirect will be much healthier than trying to overwrite the headers. However I believe I did answer correctly by saying that Link flow will not be disrupted. Somebody thought that too and up-voted. – Raul Reyes Dec 13 '17 at 11:16
0

301 Redirects can affect link value and rankings might dance a little - just make sure you did the proper optimization of the new domain. I don't think users will bother with the redirect as long as the content is there. How about putting the notice on the new domain instead? delay that might affect page speed and their attention.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.