Redirect an HTML5 Wix Site

  • Redirect an HTML5 Wix Site
  • Duda Support > Mobile Website Builder > Going Live

Overview

To redirect your HTML5 Wix site, you will need to paste the DudaMobile redirection script into an HTML widget on your HTML5 Wix site. The HTML widget can be found with the following steps:

Steps

1. From the left toolbar, click Add (the Plus button).
2. From the Add list, click Apps. Click HTML.
3. From the HTML Settings window, under Mode, click the drop-down menu and select HTML code.


4. Under HTML/embed code, paste the following DudaMobile redirect script (Be sure to replace the <mobile url> text at the end of the redirection script with the URL for your mobile site).

<script>function DM_redirect(MobileURL, Home) {
try {
// avoid loops within mobile site
if (document.getElementById("dmRoot") != null) {
return;
}
var CurrentUrl = location.href
var noredirect = document.location.search;
if (noredirect.indexOf("no_redirect=true") < 0) {
if ((navigator.userAgent.match(/(iPhone|iPod|BlackBerry|Android.*Mobile|BB10.*Mobile|webOS|Windows CE|IEMobile|Opera Mini|Opera Mobi|HTC|LG-|LGE|SAMSUNG|Samsung|SEC-SGH|Symbian|Nokia|PlayStation|PLAYSTATION|Nintendo DSi)/i))) {
if (Home) {
top.location.replace(MobileURL);
} else {
top.location.replace(MobileURL + "?url=" + encodeURIComponent(CurrentUrl));
}
}
}
} catch (err) {}
}
DM_redirect("http://mobile.dudamobile.com/site/sitename");
</script>

5. Click Update.

6. Click outside of the HTML Add on to close the HTML Settings window.

Your HTML5Wix site should now be automatically redirecting your mobile users.

Note: You will need to setup this redirect on all pages which you want to make mobile friendly.

×

Priority Phone Support

English phone support is available 18 hours a day,
Monday through Friday, 3am to 9pm (EST).

United States +1 866-776-1550 3am to 9pm (Eastern)
United Kingdom +44 (0)800-011-9071 8am to 2am (London)
France +33 (0)9-75-18-84-74 9am to 3am (Paris)
Israel +972 (0)3-720-8922 10am to 4am (Jerusalem)
Australia +61 (0)2-8880-9166 7pm to 1pm (Sydney)
To schedule a call in French, Portuguese, Hebrew or Russian, please email us at prioritysupport@dudamobile.com
×

Please Log in as a DudaPro

Priority Phone Support is available exclusively to DudaPros. Log in to your DudaPro account now to see our international support numbers.

Log In
Not a DudaPro? Start a free trial now!