301 redirect of landing page to root romain

  • 13 September 2016
  • 1 reply
  • 6 views

I am having trouble creating a 301 redirect for a landing page that I no longer need. I wish to redirect the landing page to my root domain, however the JavaScripts I have tried embedding do not seem to work.

How can I redirect a landing page on Unbounce to my root domain?


1 reply

Hi @paigekutilek,

Use this script,

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript">
   // jQuery URL redirection
   $(document).ready( function() {
      url = "http://www.mydomain.com/new-page.html";
      $( location ).attr("href", url);
  });
</script>

Make sure you add this in the head section, with jQuery unchecked.

Reply