Can I redirect single domain to more than 1 website?

MrChow

Junior Member
Joined
Jul 6, 2016
Messages
145
Reaction score
51
Is it possible to point 1 domain to multiple websites? Like each time you visit the domain you are randomly redirected to one of the websites prior set to redirect to? Thank you.
 
Yes its possible, but why are you asking about that in "Introductions"?
edit: here you go, just make index.php and paste this there.

PHP:
<?php
$random = rand(1,3);
if ($random == 1){
    header('Location: http://www.example1.com/');
}elseif ($random == 2){
    header('Location: http://www.example2.com/');
}else{
    header('Location: http://www.example3.com/');
}

?>
 
it's possible to use php script. so on the redirect page, you'll have bunch of if statement that goes to different redirect using php redirect (location:)
 
Yes its possible, but why are you asking about that in "Introductions"?

Oh shit, my bad.
Edit: Thanks for the script, but I was asking only if you have a domain.
it's possible to use php script. so on the redirect page, you'll have bunch of if statement that goes to different redirect using php redirect (location:)
Sure, but you'd need a hosting. Im asking only if you have a domain.
 
If you seriously can't afford hosting just go with some free one and put domain there with this script i pasted in post above.
I can afford a hosting, I just dont require one for what I am doing. And buying a hosting just to redirect domains, nah.
I am aware I can redirect a domain to another site directly from the registar, I just need to know if I can do that multiple times, so when it redirects it randomly chooses. Not very informed on this, thats why im asking
 
I can afford a hosting, I just dont require one for what I am doing. And buying a hosting just to redirect domains, nah.
I am aware I can redirect a domain to another site directly from the registar, I just need to know if I can do that multiple times
No you can't do that. That is why I gave you php script, if you could I would have pointed out that right away.
 
Just curious, what is the reason you want to do this?
 
The " thing " you are trying to do won't work unless you get the domain indexed again in google :) and also won't work if you do multiple domain redirects.
you can get yourself a host for a month, search for some trial hostings .. get the domain indexed and make sure google know that your domain is back live again. once you start seeing newly indexed pages.. go for the " thing "
anyway, the "thing" requires a 303 permenant redirect :D not a php redirect.
 
Thread moved to the Scripting Chat section.
 
The " thing " you are trying to do won't work unless you get the domain indexed again in google :) and also won't work if you do multiple domain redirects.
you can get yourself a host for a month, search for some trial hostings .. get the domain indexed and make sure google know that your domain is back live again. once you start seeing newly indexed pages.. go for the " thing "
anyway, the "thing" requires a 303 permenant redirect :D not a php redirect.
What the hell are you talking, he wanted random multiple redirection, which is exactly php script for.
 
Back
Top