Redirecting subpage to external URL

My organization is switching from WP to WIX and we have an external cloud server. The site is already switched, but our cloud and email isn’t redirected yet. I’ve created a subpage which points to WIX as it should. I understand that I should not use a CNAME because that wants a domain, not a URL like I want to redirect to. And I can’t use a 301 redirect because it’s not just a slug that’s redirecting, it’s an external site.
My tech advisor gave me a piece of coded to put in the webpage of the subdomain, but with it redirecting to the main domain and not having a page, I’m not sure how I can insert it.

code #redirect #external

Hi and welcome to the Wix Code community

Are you trying to redirect to your email server through your now hosted-on-wix domain?
If so, please email premium@wix.com for more assistance.

If you wish to create a simple redirect from a wix page, that will redirect visitors to an external resource, you can use the wixLocation.to function.
Simply place it in the page you wish to redirect from.

See more here.

Learn more about Wix Code here.

I have this exact same problem. I am trying to use the wixLocation.to function, but it is not redirecting. I have tried 3 different forms of code, all in HTML iframes.

1 Like

Anybody ever get this figured out? Thanks!