Redirecting certain email domains to a different landing page from form fill out

James_Leedom1
Level 2 - Champion Alumni

Redirecting certain email domains to a different landing page from form fill out

Hello,

We have certain competitors attempting to access our gated content. I have used the script to block certain domains to access our content, but I think that might promote using personal emails instead of the certain email domains that we would like to redirect.

Example: Competitor A attempts to access gated content with their @competitor.com email address. Instead of blocking them from accessing, I would like to send them to a different landing page that says "Oops! The content you were looking for does not exist. Sorry!"

Is there a way to do this? A certain LP redirect rule?

2 REPLIES 2
Josh_Hill13
Level 10 - Champion Alumni

Re: Redirecting certain email domains to a different landing page from form fill out

you would need some javascript.

You can also switch to sending autoresponse emails and not permitting the trigger to go off on competitor email domains.

SanfordWhiteman
Level 10 - Community Moderator

Re: Redirecting certain email domains to a different landing page from form fill out

You can always change the Thank You page from the one(s) configured in Form Editor, based on values entered by the lead:

MktoForms2.whenReady(function(form){

  form.onSuccess(function(vals,tyURL){

    if ( /@examplecompetitor.com$/.test(vals.Email) ) {

      document.location.href = 'someotherpage.html';

    } else {

      document.location.href = tyURL;

    }

  });

});

Of course this will expose what you're doing in the source of the page, if that matters.  You could also use Add Choice for the Thank You URL in the Form Editor, but I hardly ever do that because it doesn't give the flexibility I need.