Skip to main content

How do I set up a redirect so that all traffic to the root of my sub-domain goes to a specific landing page (without effecting any of the other landing pages)?

Hi @howardwebatomic, it is pretty easy, simply select the subdomain and leave the rest in blank



Hi @happyagencies thanks for the reply, but I don’t think this is what I am looking for. Let me explain.


I have my subdomain set up as https://foo.domain.com/


I have multiple landing pages such as

https://foo.domain.com/lp1

https://foo.domain.com/lp2

https://foo.domain.com/lp3

etc…


What I am trying to achieve is if someone visits https://foo.domain.com/ (by removing the end of the landing page URL) they would automatically be redirected to a specific page. Ideally I would like https://foo.domain.com/ to be redirected to https://www.domain.com/ (which is not an Unbounce page)


If this is not possible then https://foo.domain.com/ redirecting to https://foo.domain.com/lp1 would be OK


Is the only way to do this to create a blank landing page with a blank (root) URL and add a javascript redirection script into the head? Or is there some functionality within Unbounce that would achieve the same result?


Try this script:


$(location).attr('href', 'https://foo.domain.com/lp1')


Note: I don’t think you can do this with a PPC campaign because of Google’s Redirect Policy


If you’re interested in an instant redirect I would recommend using plain javascript:

// Simulate an HTTP redirect:

window.location.replace("https://foo.domain.com/lp1?ref=root");

source »


this way you s(h)ave a few more milliseconds of jQuery downloading time



  • adding the ?ref=root url param will allow you to track how many people have actually used this path over time. example: hello.pumpkin.care


Reply