Knowledge base

Device routing

What does “device routing” mean?

The term “device routing” means that you can re-route users to another URL based on the their device type. For example, if you only want Desktop and Tablet users to see your main site, www.example.com, and you want Smart Phone users to go to m.example.com, and Feature Phone users to go to wap.example.com, then Device Routing is exactly what you need! Netbiscuits Device Routing is a simple, easy-to-install feature for routing your traffic to the right website or webpage based on the user’s device type.

Updated weekly, Netbiscuits Device Routing includes the latest mobile device profiles, OS updates, and browser updates.

It does involve adding some JavaScript to your website’s pages, but it is incredibly simple to set up!

How does it work?

To make use of Netbiscuits’ Device Routing, all you have to do is add a JavaScript code block to the pages where you want to use it. Technically this code block can be placed anywhere on the page, but we recommend you place it in the <head> for the smoothest user experience.

A typical Device Routing code block will look something like this:

<script src="//dcs.netbiscuits.net/ds/routing/js/account/[account_name]"></script>

With the code block added, the following events happen when a user’s browser requests a page from your website:

  • The browser encounters the Device Routing code block and requests the Device Routing JavaScript file from a Netbiscuits server
  • The Device Routing server runs a few tests to identify the user’s device type
  • Once complete, the Device Routing code determines whether the user should be re-routed, and, if so, redirects the user’s browser to the proper URL

How can I use Device Routing?

  1. First of all, make sure you’ve created a Netbiscuits account and have logged in.
  2. If you’re all set there, then you need the JavaScript code block. The Device Routing code generator allows you to configure your device routing and copy your code block it to your clipboard, for example:
    Screenshot of device routing configuration page
    Just add the URLs you want to re-route, and click Save.
  3. Checking Preserve path when redirecting allows you to maintain relative paths during device routing.
  4. Once your URLs are set up, click the Save button, and your JavaScript code block will be generated for you, ready to be copied.
  5. Once copied, you can paste that code block into any pages on which you want to use Device Routing. Again, technically this code block can be placed anywhere, but we recommend you place it in the <head>.

We hope this has helped you get up and running with the Netbiscuits Device Routing. If you have any questions or need help with your setup, please contact us.

If you’re ready for the next step, find out about all the Device Detection Parameters you can build into your website!

Learn more about Device Detection Parameters

YouTube aktivieren?

Auf dieser Seite gibt es mind. ein YouTube Video. Cookies für diese Website wurden abgelehnt. Dadurch können keine YouTube Videos mehr angezeigt werden, weil YouTube ohne Cookies und Tracking Mechanismen nicht funktioniert. Willst du YouTube dennoch freischalten?