I have a cloudpage that has been replaced by a similar landing page on my website. How do i set up a redirect on the cloudpage so that everyone who lands on the cloudpage is automatically redirected to my website?
Thanks
I have a cloudpage that has been replaced by a similar landing page on my website. How do i set up a redirect on the cloudpage so that everyone who lands on the cloudpage is automatically redirected to my website?
Thanks
A simple way is to add this AMPscript at the beginning of the cloud page
%%[
set @link = 'http://www.google.com'
Redirect(@link)
]%%
Alternatively, you can use SSJS as well but the logic is a bit strange. It will run the catch redirect in the following script. (Described here: SSJS Platform.Response.Redirect() throws unknown error: Error in Application)
<script runat="server">
try{
Platform.Response.Redirect('http://www.google.com');
} catch(e) {
Platform.Response.Redirect('http://www.google.com');
}
</script>