Put the U back in URL

Kindly get that mobile prefix out of my URL, thanks


I hate seeing mobile prefixes in URLs.

What on earth am I talking about, you ask?

Well, a URL is that text in your browser that shows exactly where you are. It’s actually an acronym — it stands for ‘Uniform Resource Locator.’ (At this point, if you want to tell me that I actually mean URI, I will refer you here.)

And those prefixes? As smartphones became ubiquitous (2008–2012, give or take), mobile versions of sites became increasingly important — web developers realized that the traditional ‘desktop’ website simply wasn’t very usable on a smaller screen. As different approaches to the mobile web were being sorted out within the industry, one option was to have two entirely different versions of a website — a desktop version and a mobile version, with the mobile version located at a subdomain, generally “m.” or “mobile.”

There’s just one problem with this approach — our URLs don’t stay in one place anymore. We share things on Facebook or Twitter, we text each other links, and sometimes we even email links to each other. And if we’re not careful, that means that sometimes you end up clicking a link and seeing something like this:

mobile.nytimes.com on desktop

Now, is this a huge deal? Of course not. You can absolutely read the story. Maybe it looks a bit odd on a big screen, maybe some images don’t have a high enough resolution — you could argue that this isn’t the end of the world, and you’d be right.

But — what does URL stand for again? Uniform Resource Locator — that means that this address is the one canonical place on the internet to find that particular piece of content.

That URL shouldn’t have anything to do with the way that content is presented — it’s just an address at which content can be found.

These days, many sites sidestep this whole discussion by embracing what’s called “responsive web design” — creating a single version of a site that dynamically changes to fit the size of the screen it’s loaded on. Since there truly is only one version of the site, there’s only one URL — as it should be. You can send URLs around all you like; they should always display in a format appropriate to the screen.

beta.rallyinteractive.com — a responsive site

Now, making a single responsive site isn’t necessarily easier than separate mobile and desktop versions. Building a site that dynamically changes size while maintaining an attractive design and appropriate hierarchies is, frankly, really hard. When my coworkers and I at Rally Interactive built our new site, an incredible amount of work had to go into the responsive aspects, making sure that it would look great and function well at any screen size, on any device. It’s difficult — there’s a reason that, at the time of writing, the site remains in beta.

If a developer elects not to build a responsive site, delivering a separate mobile experience, are we doomed to see the mobile prefix? Nope, there’s still no excuse for it.

snowbird.com — two separate experiences, one single URL

When we at Rally Interactive started building the new site for Snowbird, a Utah mountain resort, we built entirely separate experiences, each with its own HTML, CSS, and JavaScript. However, like the vast majority of modern websites, it runs off a backend — software running on a server that builds and serves pages to your browser. That single backend contains all the data that underpins the site, and it serves the appropriate version of the site based on the requesting device. Django is our weapon of choice when it comes to backends, but just about any backend under the sun would be capable of serving different experiences. This approach puts the onus on the developer to ensure that there is content parity at every URL, but it can result in a great user experience if done correctly.

No matter the technical approach, users should only ever see a single URL for a single page.

Why on earth do I care so much about this? As a web professional, I think it’s part of my job to ensure the quality of the sites I work on. I fight for the users. The use of mobile subdomains is a small but annoying problem, and it creates friction for users — opening a page that’s formatted wrong for your screen is disconcerting and distracting; it gets in the way of the content.

This is low hanging fruit — it’s a problem, and it’s easy to fix. Make sure those URLs are truly Uniform. Let’s do this right.