my $link = "domain.com"; # 302 is the usual print "Status: 302 Found\nLocation: http://$link/\n\n"; # 303 may be more reliable print "Status: 303 See Other\n:Location: http://$link/\n\n";